Example #1
0
//----------------------------------------------------------------//
void USPrism::GetAABB ( USBox& box ) const {

	USVec3D walker = mLoc;
	box.Init ( walker );

	walker.Add ( mYAxis );
	box.Grow ( walker );

	walker.Add ( mZAxis );
	box.Grow ( walker );

	walker.Sub ( mYAxis );
	box.Grow ( walker );
	
	walker.Add ( mXAxis );
	box.Grow ( walker );
	
	walker.Sub ( mZAxis );
	box.Grow ( walker );

	walker.Add ( mYAxis );
	box.Grow ( walker );

	walker.Add ( mZAxis );
	box.Grow ( walker );
}
Example #2
0
//----------------------------------------------------------------//
void USPrism::GetCenter ( USVec3D& center ) const {

	center = this->mXAxis;
	center.Add ( this->mYAxis );
	center.Add ( this->mZAxis );
	center.Scale ( 0.5f );
	center.Add ( this->mLoc );
}