Space Engineers
Public Member Functions | Public Attributes | Static Public Attributes | Protected Member Functions | Protected Attributes | Properties | List of all members
VRage.Game.Components.MyRenderComponentBase Class Referenceabstract
Inheritance diagram for VRage.Game.Components.MyRenderComponentBase:
VRage.Game.Components.MyEntityComponentBase VRage.Game.Components.MyComponentBase Sandbox.Game.Components.MyRenderComponent VRage.Game.Components.MyNullRenderComponent Sandbox.Game.Components.MyRenderComponentAutomaticRifle Sandbox.Game.Components.MyRenderComponentCubeBlock Sandbox.Game.Components.MyRenderComponentCubeGrid Sandbox.Game.Components.MyRenderComponentDebrisVoxel Sandbox.Game.Components.MyRenderComponentEngineerTool Sandbox.Game.Components.MyRenderComponentEnvironmentItems Sandbox.Game.Components.MyRenderComponentFloatingObject Sandbox.Game.Components.MyRenderComponentFracturedPiece Sandbox.Game.Components.MyRenderComponentInventoryItem Sandbox.Game.Components.MyRenderComponentSensor Sandbox.Game.Components.MyRenderComponentSkinnedEntity Sandbox.Game.Components.MyRenderComponentTextPanel Sandbox.Game.Components.MyRenderComponentVoxelMap Sandbox.Game.Entities.MyRenderComponentRope

Public Member Functions

abstract void SetRenderObjectID (int index, uint ID)
 
int GetRenderObjectID ()
 
virtual void RemoveRenderObjects ()
 
abstract void ReleaseRenderObjectID (int index)
 
void ResizeRenderObjectArray (int newSize)
 
bool IsRenderObjectAssigned (int index)
 
virtual void InvalidateRenderObjects (bool sortIntoCullobjects=false)
 
virtual void UpdateRenderEntity (Vector3 colorMaskHSV)
 
void UpdateRenderObject (bool visible)
 
Color GetDiffuseColor ()
 
virtual RenderFlags GetRenderFlags ()
 
virtual VRageRender.CullingOptions GetRenderCullingOptions ()
 
abstract void AddRenderObjects ()
 
abstract void Draw ()
 
abstract bool IsVisible ()
 
- Public Member Functions inherited from VRage.Game.Components.MyEntityComponentBase
override void OnAddedToContainer ()
 Gets called after the container of this component changes More...
 
override void OnBeforeRemovedFromContainer ()
 Gets called before the removal of this component from a container More...
 
- Public Member Functions inherited from VRage.Game.Components.MyComponentBase
virtual void SetContainer (MyComponentContainer container)
 Sets the container of this component. Note that the component is not added to the container here! Therefore, use MyComponentContainer.Add(...) method and it will in turn call this method. Actually, you should seldom have the need to call this method yourself. More...
 
virtual T GetAs< T > ()
 
virtual void OnAddedToScene ()
 CH: TOOD: Be careful! This does not get called if the component is added to a container that is in the scene already! More...
 
virtual void OnRemovedFromScene ()
 CH: TOOD: Be careful! This does not get called if the component is removed from a container that is still in the scene! More...
 
virtual MyObjectBuilder_ComponentBase Serialize (bool copy=false)
 
virtual void Deserialize (MyObjectBuilder_ComponentBase builder)
 
virtual void Init (MyComponentDefinitionBase definition)
 
virtual bool IsSerialized ()
 Tells the component container serializer whether this component should be saved More...
 

Public Attributes

int LastMomentUpdateIndex = -1
 
float Transparency
 
byte DepthBias = 0
 

Static Public Attributes

static readonly Vector3 OldRedToHSV = new Vector3(0, 0.0f, 0.05f)
 
static readonly Vector3 OldYellowToHSV = new Vector3(44 / 360f, -0.1f, 0.26f)
 
static readonly Vector3 OldBlueToHSV = new Vector3(207 / 360f, 0, 0)
 
static readonly Vector3 OldGreenToHSV = new Vector3(120 / 360f, -0.48f, -0.25f)
 
static readonly Vector3 OldBlackToHSV = new Vector3(0, -0.96f, -0.5f)
 
static readonly Vector3 OldWhiteToHSV = new Vector3(0, -0.95f, 0.4f)
 
static readonly Vector3 OldGrayToHSV = new Vector3(0, -1f, 0f)
 

Protected Member Functions

virtual bool CanBeAddedToRender ()
 
virtual void UpdateRenderObjectVisibility (bool visible)
 
void SetDiffuseColor (Color vctColor)
 

Protected Attributes

Vector3 m_colorMaskHsv = OldGrayToHSV
 
bool m_enableColorMaskHsv = false
 
Color m_diffuseColor = Color.White
 
uint[] m_renderObjectIDs = new uint[] { VRageRender.MyRenderProxy.RENDER_ID_UNASSIGNED }
 

Properties

abstract object ModelStorage [get, set]
 Used by game to store model here. In game this is always of type MyModel. Implementation should only store and return passed object. More...
 
bool EnableColorMaskHsv [get, set]
 
Vector3 ColorMaskHsv [get, set]
 
MyPersistentEntityFlags2 PersistentFlags [get, set]
 
uint[] RenderObjectIDs [get]
 
bool Visible [get, set]
 
virtual bool NearFlag [get, set]
 
bool NeedsDrawFromParent [get, set]
 
bool CastShadows [get, set]
 
bool NeedsResolveCastShadow [get, set]
 
bool FastCastShadowResolve [get, set]
 
bool SkipIfTooSmall [get, set]
 
bool DrawOutsideViewDistance [get, set]
 
bool ShadowBoxLod [get, set]
 
bool OffsetInVertexShader [get, set]
 
virtual bool NeedsDraw [get, set]
 
override string ComponentTypeDebugString [get]
 
- Properties inherited from VRage.Game.Components.MyEntityComponentBase
MyEntityComponentContainer Container [get]
 
IMyEntity Entity [get]
 
abstract string ComponentTypeDebugString [get]
 Name of the base component type for debug purposes (e.g.: "Position") More...
 
- Properties inherited from VRage.Game.Components.MyComponentBase
MyComponentContainer ContainerBase [get]
 This cannot be named Container to not conflict with the definition of Container in MyEntityComponentBase. More...
 

Additional Inherited Members

- Events inherited from VRage.Game.Components.MyEntityComponentBase
static Action< MyEntityComponentBaseOnAfterAddedToContainer
 
Action< MyEntityComponentBaseBeforeRemovedFromContainer
 

Detailed Description

Definition at line 9 of file MyRenderComponentBase.cs.

Member Function Documentation

abstract void VRage.Game.Components.MyRenderComponentBase.AddRenderObjects ( )
pure virtual
virtual bool VRage.Game.Components.MyRenderComponentBase.CanBeAddedToRender ( )
inlineprotectedvirtual

Reimplemented in VRage.Game.Components.MyNullRenderComponent.

Definition at line 152 of file MyRenderComponentBase.cs.

abstract void VRage.Game.Components.MyRenderComponentBase.Draw ( )
pure virtual
Color VRage.Game.Components.MyRenderComponentBase.GetDiffuseColor ( )
inline

Definition at line 232 of file MyRenderComponentBase.cs.

virtual VRageRender.CullingOptions VRage.Game.Components.MyRenderComponentBase.GetRenderCullingOptions ( )
inlinevirtual

Definition at line 446 of file MyRenderComponentBase.cs.

virtual RenderFlags VRage.Game.Components.MyRenderComponentBase.GetRenderFlags ( )
inlinevirtual

Definition at line 423 of file MyRenderComponentBase.cs.

int VRage.Game.Components.MyRenderComponentBase.GetRenderObjectID ( )
inline

Definition at line 68 of file MyRenderComponentBase.cs.

virtual void VRage.Game.Components.MyRenderComponentBase.InvalidateRenderObjects ( bool  sortIntoCullobjects = false)
inlinevirtual
bool VRage.Game.Components.MyRenderComponentBase.IsRenderObjectAssigned ( int  index)
inline

Definition at line 96 of file MyRenderComponentBase.cs.

abstract bool VRage.Game.Components.MyRenderComponentBase.IsVisible ( )
pure virtual
abstract void VRage.Game.Components.MyRenderComponentBase.ReleaseRenderObjectID ( int  index)
pure virtual
virtual void VRage.Game.Components.MyRenderComponentBase.RemoveRenderObjects ( )
inlinevirtual
void VRage.Game.Components.MyRenderComponentBase.ResizeRenderObjectArray ( int  newSize)
inline

Definition at line 86 of file MyRenderComponentBase.cs.

void VRage.Game.Components.MyRenderComponentBase.SetDiffuseColor ( Color  vctColor)
inlineprotected

Definition at line 234 of file MyRenderComponentBase.cs.

abstract void VRage.Game.Components.MyRenderComponentBase.SetRenderObjectID ( int  index,
uint  ID 
)
pure virtual
virtual void VRage.Game.Components.MyRenderComponentBase.UpdateRenderEntity ( Vector3  colorMaskHSV)
inlinevirtual
void VRage.Game.Components.MyRenderComponentBase.UpdateRenderObject ( bool  visible)
inline

Definition at line 157 of file MyRenderComponentBase.cs.

virtual void VRage.Game.Components.MyRenderComponentBase.UpdateRenderObjectVisibility ( bool  visible)
inlineprotectedvirtual

Member Data Documentation

byte VRage.Game.Components.MyRenderComponentBase.DepthBias = 0

Definition at line 421 of file MyRenderComponentBase.cs.

int VRage.Game.Components.MyRenderComponentBase.LastMomentUpdateIndex = -1

Definition at line 24 of file MyRenderComponentBase.cs.

Vector3 VRage.Game.Components.MyRenderComponentBase.m_colorMaskHsv = OldGrayToHSV
protected

Definition at line 19 of file MyRenderComponentBase.cs.

Color VRage.Game.Components.MyRenderComponentBase.m_diffuseColor = Color.White
protected

Definition at line 22 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.m_enableColorMaskHsv = false
protected

Definition at line 20 of file MyRenderComponentBase.cs.

uint [] VRage.Game.Components.MyRenderComponentBase.m_renderObjectIDs = new uint[] { VRageRender.MyRenderProxy.RENDER_ID_UNASSIGNED }
protected

Definition at line 101 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldBlackToHSV = new Vector3(0, -0.96f, -0.5f)
static

Definition at line 15 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldBlueToHSV = new Vector3(207 / 360f, 0, 0)
static

Definition at line 13 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldGrayToHSV = new Vector3(0, -1f, 0f)
static

Definition at line 17 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldGreenToHSV = new Vector3(120 / 360f, -0.48f, -0.25f)
static

Definition at line 14 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldRedToHSV = new Vector3(0, 0.0f, 0.05f)
static

Definition at line 11 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldWhiteToHSV = new Vector3(0, -0.95f, 0.4f)
static

Definition at line 16 of file MyRenderComponentBase.cs.

readonly Vector3 VRage.Game.Components.MyRenderComponentBase.OldYellowToHSV = new Vector3(44 / 360f, -0.1f, 0.26f)
static

Definition at line 12 of file MyRenderComponentBase.cs.

float VRage.Game.Components.MyRenderComponentBase.Transparency

Definition at line 419 of file MyRenderComponentBase.cs.

Property Documentation

bool VRage.Game.Components.MyRenderComponentBase.CastShadows
getset

Definition at line 300 of file MyRenderComponentBase.cs.

Vector3 VRage.Game.Components.MyRenderComponentBase.ColorMaskHsv
getset

Definition at line 46 of file MyRenderComponentBase.cs.

override string VRage.Game.Components.MyRenderComponentBase.ComponentTypeDebugString
get

Definition at line 478 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.DrawOutsideViewDistance
getset

Definition at line 376 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.EnableColorMaskHsv
getset

Definition at line 32 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.FastCastShadowResolve
getset

Definition at line 338 of file MyRenderComponentBase.cs.

abstract object VRage.Game.Components.MyRenderComponentBase.ModelStorage
getset

Used by game to store model here. In game this is always of type MyModel. Implementation should only store and return passed object.

Definition at line 29 of file MyRenderComponentBase.cs.

virtual bool VRage.Game.Components.MyRenderComponentBase.NearFlag
getset

Definition at line 241 of file MyRenderComponentBase.cs.

virtual bool VRage.Game.Components.MyRenderComponentBase.NeedsDraw
getset

Definition at line 458 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.NeedsDrawFromParent
getset

Definition at line 280 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.NeedsResolveCastShadow
getset

Definition at line 319 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.OffsetInVertexShader
getset

Definition at line 414 of file MyRenderComponentBase.cs.

MyPersistentEntityFlags2 VRage.Game.Components.MyRenderComponentBase.PersistentFlags
getset

Definition at line 59 of file MyRenderComponentBase.cs.

uint [] VRage.Game.Components.MyRenderComponentBase.RenderObjectIDs
get

Definition at line 62 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.ShadowBoxLod
getset

Definition at line 395 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.SkipIfTooSmall
getset

Definition at line 357 of file MyRenderComponentBase.cs.

bool VRage.Game.Components.MyRenderComponentBase.Visible
getset

Definition at line 124 of file MyRenderComponentBase.cs.


The documentation for this class was generated from the following file: