Click or drag to resize
AB4D logo

MeshObjectNode Class

MeshObjectNode is an ObjectNode that can render an object that is defined by object derived from MeshBase class.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXSceneResource
        Ab3d.DirectXSceneNode
          Ab3d.DirectXObjectNode
            Ab3d.DirectXMeshObjectNode

Namespace: Ab3d.DirectX
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.0.8865.1045
Syntax
C#
public sealed class MeshObjectNode : ObjectNode, 
	IShadowCastingNode, IShadowReceivingNode, IRayHitTestedObject, IMeshNode

The MeshObjectNode type exposes the following members.

Constructors
 NameDescription
Public methodMeshObjectNode(MeshBase) Initializes a new instance of the MeshObjectNode class.
Public methodMeshObjectNode(MeshBase, String) Initializes a new instance of the MeshObjectNode class.
Public methodMeshObjectNode(MeshBase, Material, String) Initializes a new instance of the MeshObjectNode class.
Public methodMeshObjectNode(MeshBase, Material, String) Initializes a new instance of the MeshObjectNode class.
Top
Properties
 NameDescription
Public propertyIsCastingShadow Gets or sets a Boolean that specifies if this SceneNode is casing shadow. This means that if IsCastingShadow is true, then 3D objects rendered with this SceneNode will create shadow; if false shadow will not be created. True by default.
Public propertyIsReceivingShadow Gets or sets a Boolean that specifies if this SceneNode can receive shadow - this means that the shadow is rendered on the object(s) rendered by this SceneNode. NOTE: For the shadow to be visible, the effect that is used to render this mesh needs to support rendering shadows. True by default.
Public propertyMaterials Gets or sets an array of Material that can be set to override the materials defined in the Mesh.
Public propertyMesh Gets a Mesh that defines the 3D object geometry.
Top
Methods
 NameDescription
Public methodCollectRenderableObjects The task of the CollectRenderableObjects method is to create objects derived from RenderablePrimitiveBase and add them to the appropriate RenderingQueue. This method is called at the beginning of RenderScene method call but only when the scene was significantly changed (number of SceneNodes is changed, material is significantly changed, etc.)
(Overrides ObjectNodeCollectRenderableObjects)
Public methodGetClosestHitResult GetClosestHitResult method returns a DXRayHitTestResult with the closest triangle hit by the specified ray. When no triangle is hit, null is returned.
Public methodGetDetailsText Returns a string with detailed description of this SceneNode.
(Overrides ObjectNodeGetDetailsText(Boolean, Boolean, Boolean, Boolean, Boolean))
Public methodGetMesh Returns the mesh that is used by this SceneNode.
Public methodGetNextHitResult GetNextHitResult method continues hit testing from the previously returned hit test and returns a DXRayHitTestResult with the next hit triangle (not necessary the next closest triangle) or null if no other triangle is hit. This method can be used to get all hit results.
Public methodUpdate Update method is called on each update phase (before render phase)
(Overrides SceneNodeUpdate)
Public methodUpdateBounds Updates the bounds of this SceneNode if the dirty flags indicates that the bounds could be changed of if the forceUpdate parameter is set to true
(Overrides SceneNodeUpdateBounds(Boolean))
Public methodUpdateMaterial UpdateMaterial method needs to be called after a material is changed.
Public methodUpdateMesh UpdateMesh method needs to be called when the Mesh has been recreated or when SubMeshes data has changed (StartIndexLocation, IndexCount and MaterialIndex do not require regeneration of RenderingQueues). This method updates the RenderableMeshPrimitive that was added to the RenderingQueue.
Top
Fields
 NameDescription
Public fieldIsBackFaceMaterial IsBackFaceMaterial specifies if the material is used to render front (IsBackFaceMaterial == false) or back (IsBackFaceMaterial == true) faces.
Public fieldStatic memberSetOriginalObjectInRenderableMeshPrimitiveToSceneNode SetOriginalObjectInRenderableMeshPrimitiveToSceneNode is a static Boolean that specifies if the OriginalObject property of the RenderableMeshPrimitive objects that are created by this MeshObjectNode are set to the MeshObjectNode (when true; dy default) or to the Mesh object (when false; as in version 5.0 and before). This allows getting the SceneNode with hit testing.
Top
Extension Methods
 NameDescription
Public Extension MethodGetGeometryModel3D Returns a WPF's GeometryModel3D that was used to create the specified sceneNode. If the sceneNode does not define a GeometryModel3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModel3D Returns a WPF's Model3D that was used to create the specified sceneNode. If the sceneNode does not define a Model3D object, then null is returned.
(Defined by Extensions)
Public Extension MethodGetModelVisual3D Returns a WPF's ModelVisual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a ModelVisual3D is not found, then null is returned.
(Defined by Extensions)
Public Extension MethodGetVisual3D Returns a WPF's Visual3D that was used to create the specified sceneNode or any parent SceneNode (in case searchParentSceneNodes is true). If a SceneNode that defines a Visual3D is not found, then null is returned.
(Defined by Extensions)
Top
See Also