C# Class ScriptRuntime.RenderComponent

渲染相关的组件
Inheritance: ScriptRuntime.Component
Mostrar archivo Open project: Genesis-3D/Genesis-3D Class Usage Examples

Public Methods

Method Description
GetMaterialCount ( ) : uint

获得渲染相关组件的材质数量

GetMaterialID ( int index ) : string

获得渲染相关组件的第i个材质的资源名

GetMaterialInstance ( int index ) : MaterialInstance

获得渲染相关组件的第i个材质的材质实例

GetShaderCount ( ) : uint

获得渲染相关组件的着色器数量

GetShaderID ( int index ) : String

获得渲染相关组件的第i个材质的着色器名称

GetSubMeshCount ( ) : uint

获得渲染相关组件的子网格个数

IsVisible ( ) : bool

获取渲染相关组件是否可见

SetMaterialID ( int index, String pMonoStr, bool bCopy = false ) : void

设置材质资源到指定的材质索引

SetMaterialInstance ( int index, MaterialInstance pMonoObj, bool bCopy = false ) : void

设置材质实例到指定的材质索引

SetShaderConstantParam ( int index, String sParamName, System.Vector4 &val ) : void

设置渲染相关组件的第i个材质的指定向量参数的向量值

SetShaderConstantParam ( int index, String sParamName, float val ) : void

设置渲染相关组件的第i个材质的指定浮点参数的值

SetShaderID ( int index, String sSharderId ) : void

设置渲染相关组件的第i个材质的着色器

SetTexture ( int index, String sParamName, RenderToTexture rtt ) : void

设置渲染相关组件的第i个材质的指定渲染到纹理参数的参数实例

SetTexture ( int index, String sParamName, String sTexId, int iPriority ) : void

设置渲染相关组件的第i个材质的指定贴图参数的资源路径

SetVisible ( bool bVis ) : void

设置渲染相关组件是否可见

StandaloneRender ( MaterialInstance customMaterial ) : void

单独渲染组件

Protected Methods

Method Description
RenderComponent ( ) : System

Private Methods

Method Description
ICall_RenderComponent_GetMaterialID ( RenderComponent self, int iSubMesh ) : string
ICall_RenderComponent_GetMaterialInstance ( RenderComponent self, int iSubMesh ) : MaterialInstance
ICall_RenderComponent_GetShaderCount ( RenderComponent self ) : uint
ICall_RenderComponent_GetShaderID ( RenderComponent self, int index ) : String
ICall_RenderComponent_IsVisible ( RenderComponent self ) : bool
ICall_RenderComponent_SetMaterialID ( RenderComponent self, int iSubMesh, String pMonoStr, bool bCopy = false ) : void
ICall_RenderComponent_SetMaterialInstance ( RenderComponent self, int iSubMesh, MaterialInstance pMonoStr, bool bCopy = false ) : void
ICall_RenderComponent_SetShaderConstantParam ( RenderComponent self, int iSubMesh, String sParamName, float val ) : void
ICall_RenderComponent_SetShaderConstantParamF4 ( RenderComponent self, int iSubMesh, String sParamName, System.Vector4 &val ) : void
ICall_RenderComponent_SetShaderID ( RenderComponent self, int iSubMesh, String sSharderId ) : void
ICall_RenderComponent_SetTexture ( RenderComponent self, int iSubMesh, String sParamName, String sTexId, int iPriority ) : void
ICall_RenderComponent_SetTextureRTT ( RenderComponent self, int iSubMesh, String sParamName, RenderToTexture rtt ) : void
ICall_RenderComponent_SetVisible ( RenderComponent self, bool bVis ) : void
ICall_RenderComponent_StandaloneRender ( RenderComponent self, MaterialInstance customMat ) : void
RenderComponent ( DummyClass__ dummyObj ) : System

Method Details

GetMaterialCount() public method

获得渲染相关组件的材质数量
public GetMaterialCount ( ) : uint
return uint

GetMaterialID() public method

获得渲染相关组件的第i个材质的资源名
public GetMaterialID ( int index ) : string
index int 渲染相关组件的材质索引
return string

GetMaterialInstance() public method

获得渲染相关组件的第i个材质的材质实例
public GetMaterialInstance ( int index ) : MaterialInstance
index int 渲染相关组件的材质索引
return MaterialInstance

GetShaderCount() public method

获得渲染相关组件的着色器数量
public GetShaderCount ( ) : uint
return uint

GetShaderID() public method

获得渲染相关组件的第i个材质的着色器名称
public GetShaderID ( int index ) : String
index int 渲染相关组件的材质索引
return String

GetSubMeshCount() public method

获得渲染相关组件的子网格个数
public GetSubMeshCount ( ) : uint
return uint

IsVisible() public method

获取渲染相关组件是否可见
public IsVisible ( ) : bool
return bool

RenderComponent() protected method

protected RenderComponent ( ) : System
return System

SetMaterialID() public method

设置材质资源到指定的材质索引
public SetMaterialID ( int index, String pMonoStr, bool bCopy = false ) : void
index int 渲染相关组件的材质索引
pMonoStr String 要设置的资源路径
bCopy bool 是否要拷贝材质,默认是使用内存中的同一份材质
return void

SetMaterialInstance() public method

设置材质实例到指定的材质索引
public SetMaterialInstance ( int index, MaterialInstance pMonoObj, bool bCopy = false ) : void
index int 渲染相关组件的材质索引
pMonoObj MaterialInstance 要设置的材质实例
bCopy bool 是否要拷贝材质,默认是使用内存中的同一份材质
return void

SetShaderConstantParam() public method

设置渲染相关组件的第i个材质的指定向量参数的向量值
public SetShaderConstantParam ( int index, String sParamName, System.Vector4 &val ) : void
index int 渲染相关组件的材质索引
sParamName String 材质的向量参数名称
val System.Vector4 要设置的向量参数值
return void

SetShaderConstantParam() public method

设置渲染相关组件的第i个材质的指定浮点参数的值
public SetShaderConstantParam ( int index, String sParamName, float val ) : void
index int 渲染相关组件的材质索引
sParamName String 材质的浮点参数名称
val float 要设置的浮点数参数值
return void

SetShaderID() public method

设置渲染相关组件的第i个材质的着色器
public SetShaderID ( int index, String sSharderId ) : void
index int 渲染相关组件的材质索引
sSharderId String 要设置的着色器名称
return void

SetTexture() public method

设置渲染相关组件的第i个材质的指定渲染到纹理参数的参数实例
public SetTexture ( int index, String sParamName, RenderToTexture rtt ) : void
index int 渲染相关组件的材质索引
sParamName String 材质的渲染到纹理参数名称
rtt RenderToTexture 要设置的渲染到纹理实例
return void

SetTexture() public method

设置渲染相关组件的第i个材质的指定贴图参数的资源路径
public SetTexture ( int index, String sParamName, String sTexId, int iPriority ) : void
index int 渲染相关组件的材质索引
sParamName String 材质的贴图参数名称
sTexId String 要设置的贴图资源路径
iPriority int 默认的0表示同步加载,1表示异步加载
return void

SetVisible() public method

设置渲染相关组件是否可见
public SetVisible ( bool bVis ) : void
bVis bool 设置是否可见
return void

StandaloneRender() public method

单独渲染组件
public StandaloneRender ( MaterialInstance customMaterial ) : void
customMaterial MaterialInstance 单独渲染组件使用的材质
return void