C# Class world3D.Object3D

Represents a visible three dimensional object, such as a box, sphere, vehicle, NPC, ... Abstracts from the representation (like voxels) and encapsulates common operations on 3D objects like transformations.
Afficher le fichier Open project: denniskb/asvo

Méthodes publiques

Свойство Type Description
frame int

Protected Properties

Свойство Type Description
_representation BFSOctree

Méthodes publiques

Méthode Description
Object3D ( BFSOctree representation, bool rightHandedCoordinateSystem )

Creates a new 3D object consiting of the provided octree. After creation, its transformation matrices reflect its position and orientation in the world space coordinate system.

getData ( ) : BFSOctree

Returns the raw 3d data that represents this object.

getRotation ( ) : Matrix

Returns the rotation matrix of this model only. Suitable for transforming normals.

getTransformation ( ) : Matrix

Returns the transformations of this object. Rotation is always applied before translation.

rotate ( Vector3 axis, float angle ) : void

Rotates the object around axis by angle.

translate ( Vector3 offset ) : void

Translates this object by offset.

Private Methods

Méthode Description
updateTransformation ( ) : void

Caches the transformations of this model after each modification of its position / orientation.

Method Details

Object3D() public méthode

Creates a new 3D object consiting of the provided octree. After creation, its transformation matrices reflect its position and orientation in the world space coordinate system.
public Object3D ( BFSOctree representation, bool rightHandedCoordinateSystem )
representation BFSOctree The raw 3d data which represents the object in form of a BFSOctree.
rightHandedCoordinateSystem bool Indicates whether the calling /// framework uses a right-handed coordinate system and if therefore the /// object needs to be translated into this system, if false nothing happens as /// octree data is always provided in a left-handed manner.

getData() public méthode

Returns the raw 3d data that represents this object.
public getData ( ) : BFSOctree
Résultat BFSOctree

getRotation() public méthode

Returns the rotation matrix of this model only. Suitable for transforming normals.
public getRotation ( ) : Matrix
Résultat Matrix

getTransformation() public méthode

Returns the transformations of this object. Rotation is always applied before translation.
public getTransformation ( ) : Matrix
Résultat Matrix

rotate() public méthode

Rotates the object around axis by angle.
public rotate ( Vector3 axis, float angle ) : void
axis Vector3 The axis to rotate this object around.
angle float The angle to rotate this object by.
Résultat void

translate() public méthode

Translates this object by offset.
public translate ( Vector3 offset ) : void
offset Vector3 The offset to translate this object by.
Résultat void

Property Details

_representation protected_oe property

protected BFSOctree _representation
Résultat BFSOctree

frame public_oe property

public int frame
Résultat int