sealed class
|
ModelRenderer
|
implements
|
IBeginEnd
|
Count of valid renderer modes.
public
constant
|
ModeCount
=
9
|
||
type
|
int32
|
Remarks:
Ordinal values of ModelRendererMode items are in the range [0..ModeCount-1].
The fade range to apply to models during rendering.
public
property
|
Fade
{
get
set
}
|
||
type
|
RangeF
|
||
value
|
The model fade range, given as camera distance values. |
Remarks:
Models will start to become visible at Start and will have become invisible again at End.
Set to Zero to disable fading.
Defaults to Zero.
Optional view frustum to use for discarding invisible model parts.
public
property
|
Frustum
{
get
set
}
|
||
type
|
IFrustum
|
||
value
|
The
view
frustum
or
null . |
Remarks:
The current view frustum is taken into account on each call to Render.
Defaults
to
null
.
The range of model geometry instances to draw.
[BeginEnd]
|
||||
public
property
|
Instances
{
get
set
}
|
|||
type
|
RangeI
|
|||
value
|
The instance range (see SetGeometryBuffer). |
Remarks:
Will be ignored if model geometry is not instanced.
The render mode to use.
public
property
|
Mode
{
get
set
}
|
||
type
|
ModelRendererMode
|
||
value
|
The render mode. |
Remarks:
The configured render mode is only honored when Begin is called, and is retained afterwards.
Defaults to Default.
The origin point to use for rendering models.
public
property
|
Origin
{
get
set
}
|
||
type
|
Vec3D
|
||
value
|
Coordinates of the origin point. |
Remarks:
The final model-to-world transformation matrix is translated so that the origin point in world-space moves to Zero.
The configured origin point is only honored when Begin is called, and is retained afterwards.
Defaults to Zero
The model pose container that is used for rendering.
public
property
|
Pose
{
get
set
}
|
||
type
|
ModelPose
|
||
value
|
|
The model pose container. |
The shader effect camera state.
public
property
|
StateCamera
{
get
}
|
||
type
|
CameraState
|
||
value
|
|
The state wrapper. |
The shader effect lighting state.
public
property
|
StateLighting
{
get
}
|
||
type
|
LightingState
|
||
value
|
|
The state wrapper. |
The shader effect shadow-mapping state.
public
property
|
StateShadow
{
get
}
|
||
type
|
ShadowMappingState
|
||
value
|
|
The state wrapper. |
The shader effect wind state.
public
property
|
StateWind
{
get
}
|
||
type
|
WindState
|
||
value
|
|
The state wrapper. |
Returns statistics for the current Begin/End cycle.
public
property
|
Statistics
{
get
}
|
||
type
|
ModelRendererStats
|
||
value
|
The statistics. |
See also:
StatisticsClearThe unit of measure of world-space coordinates.
public
property
|
Unit
{
get
set
}
|
||
type
|
UnitOfMeasure
|
||
value
|
The
world-space
unit.
If
null ,
Metre
will
be
used.
|
Remarks:
The world-space and model-space units (see Unit) are used to compute a proper scaling factor
Defaults to Metre.
public
property
|
WindTime
{
get
set
}
|
||
type
|
float32
|
||
value
|
Creates a new instance of ModelRenderer.
public
constructor
|
ModelRenderer
(Graphics graphics)
|
||
params
|
graphics
|
[not-null]
|
The graphics object to use. |
Begins an access to this object.
public
method
|
Begin
()
|
||
implements
|
IBeginEnd.Begin
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndEnds the current access to this object.
public
method
|
End
()
|
||
implements
|
IBeginEnd.End
|
Remarks:
See the documentation of the class which implements this interface for details on the operations that must be wrapped in Begin and End calls.
See also:
BeginEndFlushes the render queue that contains opaque geometry.
[BeginEnd]
|
||||
public
method
|
FlushQueueOpaque
()
|
Flushes the render queues.
[BeginEnd]
|
||||
public
method
|
FlushQueues
()
|
Flushes the render queue that contains transparent geometry.
[BeginEnd]
|
||||
public
method
|
FlushQueueTransparent
()
|
Flushes the remembered render state.
[BeginEnd]
|
||||
public
method
|
FlushState
()
|
Remarks:
Call this method when the render state has been modified outside of the scope of this ModelRenderer object. The render state will then be restored the next time a render queue is flushed.
Renders the given 3D model.
[BeginEnd]
|
||||
public
method
|
Render
(IModel model)
|
|||
params
|
model
|
The
3D
model
to
render
or
null . |
Remarks:
The following properties are used for rendering the model:
Clears the current statistic values.
public
method
|
StatisticsClear
()
|
See also:
Statistics
[BeginEnd]
|
||||
public
method
|
TransformPop
()
|
[BeginEnd]
|
||||
public
method
|
TransformPush
(Mat4D transform)
|
|||
params
|
transform
|