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.
Exibir arquivo Open project: denniskb/asvo

Public Properties

Property Type Description
frame int

Protected Properties

Property Type Description
_representation BFSOctree

Public Methods

Method 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

Method Description
updateTransformation ( ) : void

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

Method Details

Object3D() public method

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 method

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

getRotation() public method

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

getTransformation() public method

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

rotate() public method

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.
return void

translate() public method

Translates this object by offset.
public translate ( Vector3 offset ) : void
offset Vector3 The offset to translate this object by.
return void

Property Details

_representation protected_oe property

protected BFSOctree _representation
return BFSOctree

frame public_oe property

public int frame
return int