Spinning Topp Logo BlackTopp Studios
inc
roundedboxgenerator.cpp
1 // © Copyright 2010 - 2016 BlackTopp Studios Inc.
2 /* This file is part of The Mezzanine Engine.
3 
4  The Mezzanine Engine is free software: you can redistribute it and/or modify
5  it under the terms of the GNU General Public License as published by
6  the Free Software Foundation, either version 3 of the License, or
7  (at your option) any later version.
8 
9  The Mezzanine Engine is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY; without even the implied warranty of
11  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  GNU General Public License for more details.
13 
14  You should have received a copy of the GNU General Public License
15  along with The Mezzanine Engine. If not, see <http://www.gnu.org/licenses/>.
16 */
17 /* The original authors have included a copy of the license specified above in the
18  'Docs' folder. See 'gpl.txt'
19 */
20 /* We welcome the use of the Mezzanine engine to anyone, including companies who wish to
21  Build professional software and charge for their product.
22 
23  However there are some practical restrictions, so if your project involves
24  any of the following you should contact us and we will try to work something
25  out:
26  - DRM or Copy Protection of any kind(except Copyrights)
27  - Software Patents You Do Not Wish to Freely License
28  - Any Kind of Linking to Non-GPL licensed Works
29  - Are Currently In Violation of Another Copyright Holder's GPL License
30  - If You want to change our code and not add a few hundred MB of stuff to
31  your distribution
32 
33  These and other limitations could cause serious legal problems if you ignore
34  them, so it is best to simply contact us or the Free Software Foundation, if
35  you have any questions.
36 
37  Joseph Toppi - toppij@gmail.com
38  John Blackwood - makoenergy02@gmail.com
39 */
40 /*
41  -----------------------------------------------------------------------------
42  This source file is part of ogre-procedural
43 
44  For the latest info, see http://code.google.com/p/ogre-procedural/
45 
46  Copyright (c) 2010-2013 Michael Broutin
47 
48  Permission is hereby granted, free of charge, to any person obtaining a copy
49  of this software and associated documentation files (the "Software"), to deal
50  in the Software without restriction, including without limitation the rights
51  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
52  copies of the Software, and to permit persons to whom the Software is
53  furnished to do so, subject to the following conditions:
54 
55  The above copyright notice and this permission notice shall be included in
56  all copies or substantial portions of the Software.
57 
58  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
59  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
60  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
61  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
62  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
63  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
64  THE SOFTWARE.
65  -----------------------------------------------------------------------------
66  */
67 #ifndef _graphicsproceduralroundedboxgenerator_cpp
68 #define _graphicsproceduralroundedboxgenerator_cpp
69 
70 #include "Graphics/Procedural/Mesh/roundedboxgenerator.h"
71 #include "Graphics/Procedural/Mesh/planegenerator.h"
72 
73 #include "MathTools/mathtools.h"
74 #include "exception.h"
75 
76 namespace Mezzanine
77 {
78  namespace Graphics
79  {
80  namespace Procedural
81  {
82  RoundedBoxGenerator::RoundedBoxGenerator(const Vector3& Size, const Real ChamferSize, const Whole SegX, const Whole SegY, const Whole SegZ, const Whole ChamferSeg)
83  {
84  this->SetSize(Size);
85  this->SetChamferSize(ChamferSize);
86  this->SetNumSegX(SegX);
87  this->SetNumSegY(SegY);
88  this->SetNumSegZ(SegZ);
89  this->SetNumChamferSeg(ChamferSeg);
90  }
91 
92  RoundedBoxGenerator::RoundedBoxGenerator(const Real SizeX, const Real SizeY, const Real SizeZ, const Real ChamferSize, const Whole SegX, const Whole SegY, const Whole SegZ, const Whole ChamferSeg)
93  {
94  this->SetSizeX(SizeX);
95  this->SetSizeY(SizeY);
96  this->SetSizeZ(SizeZ);
97  this->SetChamferSize(ChamferSize);
98  this->SetNumSegX(SegX);
99  this->SetNumSegY(SegY);
100  this->SetNumSegZ(SegZ);
101  this->SetNumChamferSeg(ChamferSeg);
102  }
103 
105  { }
106 
107  void RoundedBoxGenerator::_AddEdge(TriangleBuffer& Buffer, Int16 XPos, Int16 YPos, Int16 ZPos) const
108  {
109  Integer Offset = 0;
110 
111  Vector3 centerPosition = ( Vector3::Unit_X() * ( 0.5 * XPos * this->BoxSize.X ) ) + ( Vector3::Unit_Y() * ( 0.5 * YPos * this->BoxSize.Y ) ) + ( Vector3::Unit_Z() * ( 0.5 * ZPos * this->BoxSize.Z ) );
112  Vector3 vy0 = Vector3::Unit_X() * ( 1.f - MathTools::Abs(XPos) ) + Vector3::Unit_Y() * ( 1.f - MathTools::Abs(YPos) ) + Vector3::Unit_Z() * ( 1.f - MathTools::Abs(ZPos) );//extrusion direction
113 
114  Vector3 vx0 = vy0.GetAntiPermute();
115  Vector3 vz0 = vy0.GetPermute();
116  if( vx0.DotProduct(centerPosition) < 0.0 )
117  vx0 = -vx0;
118  if( vz0.DotProduct(centerPosition) < 0.0 )
119  vz0 = -vz0;
120  if( vx0.CrossProduct(vy0).DotProduct(vz0) < 0.0 )
121  vy0 = -vy0;
122 
123  Real height = ( 1 - MathTools::Abs(XPos) ) * this->BoxSize.X + ( 1 - MathTools::Abs(YPos) ) * this->BoxSize.Y + ( 1 - MathTools::Abs(ZPos) ) * this->BoxSize.Z;
124  Vector3 OffsetPosition = centerPosition - ( vy0 * ( 0.5 * height ) );
125  Integer numSegHeight = 1;
126 
127  if( XPos == 0 )
128  numSegHeight = this->NumSegX;
129  else if( YPos == 0 )
130  numSegHeight = this->NumSegY;
131  else if( ZPos == 0 )
132  numSegHeight = this->NumSegZ;
133 
134  Real deltaAngle = ( MathTools::GetHalfPi() / this->NumChamferSeg );
135  Real deltaHeight = height / (Real)numSegHeight;
136 
137 
138  Buffer.RebaseOffset();
139  Buffer.EstimateIndexCount( 6 * numSegHeight * this->NumChamferSeg );
140  Buffer.EstimateVertexCount( ( numSegHeight + 1 ) * ( this->NumChamferSeg + 1 ) );
141 
142  for( Integer i = 0 ; i <= numSegHeight ; i++ )
143  {
144  for( Whole j = 0 ; j <= this->NumChamferSeg ; j++ )
145  {
146  Real x0 = this->BoxChamferSize * cosf( j * deltaAngle );
147  Real z0 = this->BoxChamferSize * sinf( j * deltaAngle );
148  this->AddPoint( Buffer, Vector3( ( vx0 * x0 ) + ( vy0 * ( i * deltaHeight ) ) + ( vz0 * z0 ) + OffsetPosition ),
149  ( vx0 * x0 + vz0 * z0 ).GetNormal(),
150  Vector2( j / (Real)this->NumChamferSeg, i / (Real)numSegHeight ) );
151 
152  if( i != numSegHeight && j != this->NumChamferSeg ) {
153  Buffer.AddIndex( Offset + this->NumChamferSeg + 2 );
154  Buffer.AddIndex( Offset );
155  Buffer.AddIndex( Offset + this->NumChamferSeg + 1 );
156  Buffer.AddIndex( Offset + this->NumChamferSeg + 2 );
157  Buffer.AddIndex( Offset + 1 );
158  Buffer.AddIndex( Offset );
159  }
160  Offset ++;
161  }
162  }
163  }
164 
165  void RoundedBoxGenerator::_AddCorner(TriangleBuffer& Buffer, Boole IsXPositive, Boole IsYPositive, Boole IsZPositive) const
166  {
167  Buffer.RebaseOffset();
168  Buffer.EstimateVertexCount( ( this->NumChamferSeg + 1) * ( this->NumChamferSeg + 1 ) );
169  Buffer.EstimateIndexCount( this->NumChamferSeg * this->NumChamferSeg * 6 );
170  Integer Offset = 0;
171 
172  Vector3 OffsetPosition( ( IsXPositive ? 1 : -1 ) * .5f * this->BoxSize.X, ( IsYPositive ? 1 : -1 ) * .5f * this->BoxSize.Y, ( IsZPositive ? 1 : -1 ) * .5f * this->BoxSize.Z );
173  Real deltaRingAngle = ( MathTools::GetHalfPi() / this->NumChamferSeg );
174  Real deltaSegAngle = ( MathTools::GetHalfPi() / this->NumChamferSeg );
175  Real OffsetRingAngle = IsYPositive ? 0 : MathTools::GetHalfPi();
176  Real OffsetSegAngle;
177  if ( IsXPositive && IsZPositive )
178  OffsetSegAngle = 0;
179  if ( ( !IsXPositive ) && IsZPositive )
180  OffsetSegAngle = 1.5f * MathTools::GetPi();
181  if ( IsXPositive && ( !IsZPositive ) )
182  OffsetSegAngle = MathTools::GetHalfPi();
183  if ( ( !IsXPositive ) && ( !IsZPositive ) )
184  OffsetSegAngle = MathTools::GetPi();
185 
186  // Generate the group of rings for the sphere
187  for( Whole ring = 0 ; ring <= this->NumChamferSeg ; ring++ )
188  {
189  Real r0 = this->BoxChamferSize * sinf( ring * deltaRingAngle + OffsetRingAngle );
190  Real y0 = this->BoxChamferSize * cosf( ring * deltaRingAngle + OffsetRingAngle );
191 
192  // Generate the group of segments for the current ring
193  for( Whole seg = 0 ; seg <= this->NumChamferSeg ; seg++ )
194  {
195  Real x0 = r0 * sinf( seg * deltaSegAngle + OffsetSegAngle );
196  Real z0 = r0 * cosf( seg * deltaSegAngle + OffsetSegAngle );
197 
198  // Add one vertex to the strip which makes up the sphere
199  this->AddPoint( Buffer, Vector3( x0 + OffsetPosition.X, y0 + OffsetPosition.Y, z0 + OffsetPosition.Z ),
200  Vector3( x0, y0, z0 ).GetNormal(),
201  Vector2( (Real)seg / (Real)this->NumChamferSeg, (Real) ring / (Real)this->NumChamferSeg ) );
202 
203  if( ( ring != this->NumChamferSeg ) && ( seg != this->NumChamferSeg ) ) {
204  // each vertex (except the last) has six indices pointing to it
205  Buffer.AddIndex( Offset + this->NumChamferSeg + 2 );
206  Buffer.AddIndex( Offset );
207  Buffer.AddIndex( Offset + this->NumChamferSeg + 1 );
208  Buffer.AddIndex( Offset + this->NumChamferSeg + 2 );
209  Buffer.AddIndex( Offset + 1 );
210  Buffer.AddIndex( Offset );
211  }
212 
213  Offset++;
214  }//for each segment
215  }//for each ring
216  }
217 
218  ///////////////////////////////////////////////////////////////////////////////
219  // Utility
220 
222  {
223  // Generate the pseudo-box shape
224  PlaneGenerator PG;
225  PG.SetUTile(this->UTile).SetVTile(this->VTile);
226  if( this->GeneratorOpts | GO_Transform ) {
227  PG.SetScale(this->Scale);
228  PG.SetOrientation(this->Orientation);
229  }
230 
231  PG.SetNumSegX( this->NumSegY ).SetNumSegY( this->NumSegX ).SetSizeX( this->BoxSize.Y ).SetSizeY( this->BoxSize.X )
233  .SetPosition( ( this->Orientation * Vector3::Neg_Unit_Z() ) * ( 0.5 * this->BoxSize.Z + this->BoxChamferSize ) )
234  .AddToTriangleBuffer( Buffer );
235  Buffer.RebaseOffset();
236  PG.SetNumSegX( this->NumSegY ).SetNumSegY( this->NumSegX ).SetSizeX( this->BoxSize.Y ).SetSizeY( this->BoxSize.X )
238  .SetPosition( ( this->Orientation * Vector3::Unit_Z() ) * ( 0.5 * this->BoxSize.Z + this->BoxChamferSize ) )
239  .AddToTriangleBuffer( Buffer );
240  Buffer.RebaseOffset();
241  PG.SetNumSegX( this->NumSegZ ).SetNumSegY( this->NumSegX ).SetSizeX( this->BoxSize.Z ).SetSizeY( this->BoxSize.X )
243  .SetPosition( ( this->Orientation * Vector3::Neg_Unit_Y() ) * ( 0.5 * this->BoxSize.Y + this->BoxChamferSize ) )
244  .AddToTriangleBuffer( Buffer );
245  Buffer.RebaseOffset();
246  PG.SetNumSegX( this->NumSegZ ).SetNumSegY( this->NumSegX ).SetSizeX( this->BoxSize.Z ).SetSizeY( this->BoxSize.X )
248  .SetPosition( ( this->Orientation * Vector3::Unit_Y() ) * ( 0.5 * this->BoxSize.Y + this->BoxChamferSize ) )
249  .AddToTriangleBuffer( Buffer );
250  Buffer.RebaseOffset();
251  PG.SetNumSegX( this->NumSegZ ).SetNumSegY( this->NumSegY ).SetSizeX( this->BoxSize.Z ).SetSizeY( this->BoxSize.Y )
253  .SetPosition( ( this->Orientation * Vector3::Neg_Unit_X() ) * ( 0.5 * this->BoxSize.X + this->BoxChamferSize ) )
254  .AddToTriangleBuffer( Buffer );
255  Buffer.RebaseOffset();
256  PG.SetNumSegX( this->NumSegZ ).SetNumSegY( this->NumSegY ).SetSizeX( this->BoxSize.Z ).SetSizeY( this->BoxSize.Y )
258  .SetPosition( ( this->Orientation * Vector3::Unit_X() ) * ( 0.5 * this->BoxSize.X + this->BoxChamferSize ) )
259  .AddToTriangleBuffer( Buffer );
260 
261  // Generate the corners
262  this->_AddCorner( Buffer, true, true, true );
263  this->_AddCorner( Buffer, true, true, false );
264  this->_AddCorner( Buffer, true, false, true );
265  this->_AddCorner( Buffer, true, false, false );
266  this->_AddCorner( Buffer, false, true, true );
267  this->_AddCorner( Buffer, false, true, false );
268  this->_AddCorner( Buffer, false, false, true );
269  this->_AddCorner( Buffer, false, false, false );
270 
271  // Generate the edges
272  this->_AddEdge( Buffer, -1,-1, 0 );
273  this->_AddEdge( Buffer, -1, 1, 0 );
274  this->_AddEdge( Buffer, 1,-1, 0 );
275  this->_AddEdge( Buffer, 1, 1, 0 );
276  this->_AddEdge( Buffer, -1, 0,-1 );
277  this->_AddEdge( Buffer, -1, 0, 1 );
278  this->_AddEdge( Buffer, 1, 0,-1 );
279  this->_AddEdge( Buffer, 1, 0, 1 );
280  this->_AddEdge( Buffer, 0,-1,-1 );
281  this->_AddEdge( Buffer, 0,-1, 1 );
282  this->_AddEdge( Buffer, 0, 1,-1 );
283  this->_AddEdge( Buffer, 0, 1, 1 );
284  }
285 
286  ///////////////////////////////////////////////////////////////////////////////
287  // Configuration
288 
290  {
291  if( SizeX <= 0.0 )
292  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Size on an axis for a generated box mesh must be greater than zero.");
293 
294  this->BoxSize.X = SizeX;
295  return *this;
296  }
297 
299  {
300  if( SizeY <= 0.0 )
301  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Size on an axis for a generated box mesh must be greater than zero.");
302 
303  this->BoxSize.Y = SizeY;
304  return *this;
305  }
306 
308  {
309  if( SizeZ <= 0.0 )
310  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Size on an axis for a generated rounded box mesh must be greater than zero.");
311 
312  this->BoxSize.Z = SizeZ;
313  return *this;
314  }
315 
317  {
318  this->SetSizeX(Size.X);
319  this->SetSizeY(Size.Y);
320  this->SetSizeZ(Size.Z);
321  return *this;
322  }
323 
325  {
326  if( ChamferSize <= 0.0 )
327  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Size for radius of rounded edge on a generated rounded box mesh must be greater than zero.");
328 
329  this->BoxChamferSize = ChamferSize;
330  return *this;
331  }
332 
334  {
335  if( SegX == 0 )
336  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Number of segments for generated rounded box mesh must be greater than zero.");
337 
338  this->NumSegX = SegX;
339  return *this;
340  }
341 
343  {
344  if( SegY == 0 )
345  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Number of segments for generated rounded box mesh must be greater than zero.");
346 
347  this->NumSegY = SegY;
348  return *this;
349  }
350 
352  {
353  if( SegZ == 0 )
354  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Number of segments for generated rounded box mesh must be greater than zero.");
355 
356  this->NumSegZ = SegZ;
357  return *this;
358  }
359 
361  {
362  if( ChamferSeg == 0 )
363  MEZZ_EXCEPTION(ExceptionBase::PARAMETERS_EXCEPTION,"Number of segments for generated rounded box mesh must be greater than zero.");
364 
365  this->NumChamferSeg = ChamferSeg;
366  return *this;
367  }
368  }//Procedural
369  }//Graphics
370 }//Mezzanine
371 
372 #endif
virtual void AddToTriangleBuffer(TriangleBuffer &Buffer) const
Adds the vertices and indices as configured in this generator to a triangle buffer.
PlaneGenerator & SetNumSegY(const Whole SegY)
Sets the number of segments along local Y axis.
RoundedBoxGenerator & SetSizeZ(const Real SizeZ)
Sets the size of the box along Z axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be t...
Vector3 CrossProduct(const Vector3 &Vec) const
This is used to calculate the crossproduct of this and another vector.
Definition: vector3.cpp:338
bool Boole
Generally acts a single bit, true or false.
Definition: datatypes.h:173
Real X
Coordinate on the X vector.
Definition: vector3.h:85
Real Z
Coordinate on the Z vector.
Definition: vector3.h:89
T & SetVTile(const Real vTile)
Sets the V Tile.
RoundedBoxGenerator & SetNumSegX(const Whole SegX)
Sets the number of segments along X axis the number of segments is set to 0, a PARAMETERS_EXCEPTION w...
Whole NumChamferSeg
The number of segments to generate along the length of the rounded edges.
A convenience buffer that stores vertices and indices of a mesh to be generated.
virtual void AddToTriangleBuffer(TriangleBuffer &Buffer) const
Adds the vertices and indices as configured in this generator to a triangle buffer.
Real BoxChamferSize
The radius of the rounded portion of the box corners.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
Definition: exception.h:3048
void EstimateIndexCount(const Whole IndexCount)
Gives an estimation of the number of indices needed for this triangle buffer.
int Integer
A datatype used to represent any integer close to.
Definition: datatypes.h:154
T & SetScale(const Vector3 &Scaling)
Sets a scale baked into the resulting mesh.
RoundedBoxGenerator & SetChamferSize(const Real ChamferSize)
Sets the size of the chamfer, ie the radius of the rounded part the size is set to 0 or less...
RoundedBoxGenerator & SetNumSegZ(const Whole SegZ)
Sets the number of segments along Z axis the number of segments is set to 0, a PARAMETERS_EXCEPTION w...
Whole NumSegX
The number of segments to generate along the X axis for each side.
This implements the exception hiearchy for Mezzanine.
RoundedBoxGenerator & SetNumSegY(const Whole SegY)
Sets the number of segments along Y axis the number of segments is set to 0, a PARAMETERS_EXCEPTION w...
float Real
A Datatype used to represent a real floating point number.
Definition: datatypes.h:141
T & SetPosition(const Vector3 &Loc)
Sets a translation baked into the resulting mesh.
T & SetOrientation(const Quaternion &Ori)
Sets an orientation baked into the resulting mesh.
RoundedBoxGenerator(const Vector3 &Size, const Real ChamferSize, const Whole SegX=1, const Whole SegY=1, const Whole SegZ=1, const Whole ChamferSeg=1)
Vector constructor.
A generator class for a plane mesh.
Vector3 GetAntiPermute() const
Gets a anti-permuted copy of this vector.
Definition: vector3.cpp:404
void EstimateVertexCount(const Whole VertexCount)
Gives an estimation of the number of vertices need for this triangle buffer.
This is used to represent a point on a 2 dimentional area, such as a screen.
Definition: vector2.h:63
static Vector3 Unit_Y()
Gets a vector representing the Y unit of a Vector3.
Definition: vector3.cpp:134
void _AddCorner(TriangleBuffer &Buffer, Boole IsXPositive, Boole IsYPositive, Boole IsZPositive) const
Builds a "corner" of the rounded box, ie a 1/8th of a sphere.
PlaneGenerator & SetNormal(const Vector3 &Norm)
Sets the normal of the plane. the normal is zero length a PARAMETERS_EXCEPTION will be thrown...
Real Y
Coordinate on the Y vector.
Definition: vector3.h:87
static Vector3 Neg_Unit_X()
Gets a vector representing the negative X unit of a Vector3.
Definition: vector3.cpp:140
void AddPoint(TriangleBuffer &Buffer, const Vector3 &Loc, const Vector3 &Norm, const Vector2 &UV) const
Adds a new point to a triangle buffer, using the format defined for that MeshGenerator.
int16_t Int16
An 16-bit integer.
Definition: datatypes.h:120
Thrown when parameters are checked at runtime and found invalid.
Definition: exception.h:108
static Vector3 Unit_X()
Gets a vector representing the X unit of a Vector3.
Definition: vector3.cpp:131
Vector3 BoxSize
The size of the box to generate.
Real DotProduct(const Vector3 &Vec) const
This is used to calculate the dotproduct of this and another vector.
Definition: vector3.cpp:347
PlaneGenerator & SetSizeX(const Real SizeX)
Sets the size of this plane on the X axis. the size passed in is zero or less a PARAMETERS_EXCEPTION ...
static Vector3 Unit_Z()
Gets a vector representing the Z unit of a Vector3.
Definition: vector3.cpp:137
RoundedBoxGenerator & SetSizeY(const Real SizeY)
Sets the size of the box along Y axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be t...
PlaneGenerator & SetNumSegX(const Whole SegX)
Sets the number of segements along local X axis.
TriangleBuffer & AddIndex(const Integer Index)
Adds an index to the index buffer.
Vector3 GetPermute() const
Gets a permuted copy of this vector.
Definition: vector3.cpp:393
This is used to represent a point in space, or a vector through space.
Definition: vector3.h:77
PlaneGenerator & SetSizeY(const Real SizeY)
Sets the size of this plane on the Y axis. the size passed in is zero or less a PARAMETERS_EXCEPTION ...
void _AddEdge(TriangleBuffer &Buffer, Int16 XPos, Int16 YPos, Int16 ZPos) const
Builds an "edge" of the rounded box, ie a quarter cylinder.
Whether or not a transform has been defined and is to be used.
Definition: meshgenerator.h:95
The bulk of the engine components go in this namspace.
Definition: actor.cpp:56
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Definition: datatypes.h:151
Whole NumSegZ
The number of segments to generate along the Z axis for each side.
T & SetUTile(const Real uTile)
Sets the U Tile.
A generator class for a rounded box mesh.
UInt8 GeneratorOpts
Storage for the boolean options to be used by this generator.
RoundedBoxGenerator & SetSizeX(const Real SizeX)
Sets the size of the box along X axis. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be t...
static Vector3 Neg_Unit_Z()
Gets a vector representing the negative Z unit of a Vector3.
Definition: vector3.cpp:146
Whole NumSegY
The number of segments to generate along the Y axis for each side.
RoundedBoxGenerator & SetNumChamferSeg(const Whole ChamferSeg)
Sets the number of segments along the rounded edge of the box. the number of segments is set to 0...
static Vector3 Neg_Unit_Y()
Gets a vector representing the negative Y unit of a Vector3.
Definition: vector3.cpp:143
RoundedBoxGenerator & SetSize(const Vector3 &Size)
Sets the size of the box. the size is set to 0 or less, a PARAMETERS_EXCEPTION will be thrown...