MeshRendererToGraphicsInterfaceAdapter Class Reference

This class provides a way to access a MeshRenderer component, on the same GameObject, through all the various IGraphics interfaces.

Protected Member Functions

override Bounds GetLocalBounds ()
 Attempts to get the local bounds of the mesh rendered by the MeshRenderer. Requires a meshFilter component be present on the object to function properly. If no meshFilter is present return a new Bounds result.
 

Additional Inherited Members

- Public Member Functions inherited from BaseRendererToGraphicsInterfaceAdapter< MeshRenderer >
void GetPropertyBlock (out MaterialPropertyBlock dest)
 Matches the form of the unity Renderer function of the same name.
 
virtual void GetPropertyBlock (out MaterialPropertyBlock dest, int matIndex)
 Finds and sets the reference of parameter dest, to the Property block found in the renderer's material (at the provided index).
 
virtual bool HasColor ()
 Returns weather or not the material(first material on renderer) actually has a color value that can be used.
 
virtual bool HasColor (int matIndex)
 Specifies if the material the renderer uses (at the provided index), has a _Color
 
virtual bool HasTexture ()
 Returns weather or not the material(first material on renderer) actually has a texture variable that can be used.
 
virtual bool HasTexture (int matIndex)
 Specifies if the material the renderer uses (at the provided index), has a _MainTexture
 
virtual void RebuildPropertyBlock ()
 This function is called when an enabled state is changed. It clears the current property block, and re-adds the assigned color and, if not null, the assigned texture.
 
void RebuildPropertyBlock (int matIndex)
 This function will be invoked wen the property block needs to be rebuilt. For example, if it contains a texture, and a texture is added
 
void SetPropertyBlock (MaterialPropertyBlock dest)
 Matches the form of the unity Renderer function of the same name. Caches and assigns the provided MaterialPropertyBlock to the rendererRef.
 
virtual void SetPropertyBlock (MaterialPropertyBlock dest, int matIndex)
 Matches the form of the unity Renderer function of the same name. Caches and assigns the provided MaterialPropertyBlock to the rendererRef.
 
virtual void ValidateViewableState ()
 Invoked OnEnable to ensure that all descendants of this object in the hierarchy (that implement IGraphicsViewable), are set the same "viewable" state as this object.
 
- Public Attributes inherited from BaseRendererToGraphicsInterfaceAdapter< MeshRenderer >
bool boundsIncludesDecendants
 Specified weather the bounds accessor should encapsulate the bounds of IGraphicsBounds of this GameObject's scene hierarchy descendants.
 
Texture currentMainTexture
 Cashed reference to the texture used.
 
bool isViewableIncludesDecendants
 When true, isViewable will return true if this object or ANY descendant IGraphicsViewable has isViewable return true.
 
- Protected Attributes inherited from BaseRendererToGraphicsInterfaceAdapter< MeshRenderer >
Color currentColor
 Stores the current color that is assigned to the material property block.
 
- Properties inherited from BaseRendererToGraphicsInterfaceAdapter< MeshRenderer >
virtual Bounds bounds [get]
 Returns the local bounds of this object as defined by the virtual GetLocalBounds function. If the boundsIncludesDecendants member is true, the returned bounds will encapsulate all IGraphicsBounds scene descendants of this object.
 
virtual Color color [get, set]
 returns the currentColor that is assigned to the material property block. when set, checks enabled status, and caches then assigns the color to the material property block.
 
virtual bool colorInterfaceEnabled [get, set]
 This overridable accessor simply get/sets the stored enabled/disabled state of the color adapter. If false, changes to this components color, will NOT affect the renderer.
 
virtual bool isViewable [get, set]
 Return true if the rendererRef is enabled. Not affected by weather or not the object is actually visible by any camera. Setting this value will set the state of the refererRef. When isViewableIncludesDecendants is true; the getter will return true if ANY descendant IGraphicsViewable, or this object isViewable. And the setter will set the rendererRef enabled state for ALL descendant IGraphicsViewable components.
 
virtual Texture mainTexture [get, set]
 Get accessor returns the cashed currentMainTexture reference, assigned by the user to this IGraphicsTexureInterface. Assignment of a different texture will also set the texture used by the material in the rendererRef.
 
TRendererType rendererRef [get, set]
 Accessor to the Renderer being adapted. If no renderer has been specified, it will attempt to find a renderer of type TRendererType, attached to this GameObject.
 
virtual bool textureInterfaceEnabled [get, set]
 Used to enable/disable use of the texture provided. Changing this value will force a rebuild of the property block used to display the texture.
 
+ Inheritance diagram for MeshRendererToGraphicsInterfaceAdapter:
+ Collaboration diagram for MeshRendererToGraphicsInterfaceAdapter: