Class TVRMLShapeState
Unit
VRMLShapeState
Declaration
type TVRMLShapeState = class(TObject)
Description
This class represents a pair of objects: ShapeNode and State. It allows to perform some operations that need to know both things.
This class caches results of methods [Local]BoundingBox, VerticesCount and TrianglesCount. This means that things work fast, but this also means that you must manually call Changed when you changed some properties of ShapeNode or contents of State.
But note that you can't change ShapeNode or State to different objects — they are readonly properties.
Also note that if you're using TVRMLFlatScene class then you don't have to worry about calling Changed of items in TVRMLFlatScene.ShapeStates. All you have to do is to call appropriate Changed* methods of TVRMLFlatScene.
Hierarchy
Overview
Methods
Properties
Description
Methods
 |
function VerticesCount(OverTriangulate: boolean): Cardinal; |
|
|
 |
function TrianglesCount(OverTriangulate: boolean): Cardinal; |
|
|
 |
function BoundingSphereCenter: TVector3Single; |
|
This calculates bounding sphere basing on BoundingBox. In the future this may be changed to use BoundingSphere method of TNodeGeneralShape, when I will implement it. For now, BoundingSphere is always worse approximation of bounding volume than BoundingBox (i.e. BoundingSphere is always larger) but it may be useful in some cases when detecting collision versus bounding sphere is much faster than detecting them versus bounding box.
BoundingSphereRadiusSqr = 0 and BoundingSphereCenter is undefined if Box is empty.
|
 |
function BoundingSphereRadiusSqr: Single; |
|
|
 |
function AllMaterialsTransparent: boolean; |
|
|
 |
procedure Changed; |
|
|
 |
destructor Destroy; override; |
|
|
Properties
 |
property ShapeNode: TNodeGeneralShape read FShapeNode; |
|
ShapeNode to wskaznik na obiekt w RootNode
|
 |
property State: TVRMLGraphTraverseState read FState; |
|
State is OWNED by this TVRMLShape class - I mean, we will do State.Free in destructor
|
Generated by PasDoc 0.10.0 on 2008-02-25 00:00:46