CGeometryCreator.h
Go to the documentation of this file.
1 
2 #pragma once
3 
4 #include "CSimpleMesh.h"
5 
6 
7 namespace ion
8 {
9  namespace Scene
10  {
11 
13  {
14 
15  public:
16 
17  static CSimpleMesh * CreateCube(vec3f const & Size = vec3f(1.f));
18 
19  static CSimpleMesh * CreateCylinder(
20  f32 const baseRadius = 0.2f,
21  f32 const topRadius = 0.2f,
22  f32 const height = 1.f,
23  uint const slices = 32,
24  uint const stacks = 4);
25 
26  static CSimpleMesh * CreateDisc(
27  f32 const innerRadius = 0.1f,
28  f32 const outerRadius = 0.5f,
29  f32 const height = 0.2f,
30  uint const slices = 32,
31  uint const stacks = 4);
32 
33  static CSimpleMesh * CreateTorus(
34  f32 const centralRadius = 1.f,
35  f32 const innerRadius = 0.25f,
36  uint const slices = 16,
37  uint const stacks = 20);
38 
39  static CSimpleMesh * CreateSphere(
40  vec3f const & Radii = vec3f(0.5f),
41  uint const Slices = 32,
42  uint const Stacks = 16);
43 
44  static CSimpleMesh * CreateSkySphere();
45 
46  static CSimpleMesh * CreatePlane(
47  vec2f const & Size = vec2f(1.f));
48 
49  static CSimpleMesh * CreateWafer(
50  f32 const radius = 0.5f, uint const Slices = 40);
51 
53 
54  static CSimpleMesh * Intersect(CSimpleMesh const * A, CSimpleMesh const * B, vec3f const & AOffset = 0, vec3f const & BOffset = 0);
55 
56  static void IntersectAndDelete(CSimpleMesh * A, CSimpleMesh const * B, vec3f const & BOffset = 0);
57 
58  static vector<CSimpleMesh *> LoadOBJFile(string const & FileName, string const & Path = "");
59 
60  };
61 
62  }
63 }
static CSimpleMesh * CreateDisc(f32 const innerRadius=0.1f, f32 const outerRadius=0.5f, f32 const height=0.2f, uint const slices=32, uint const stacks=4)
Definition: CGeometryCreator.cpp:165
static CSimpleMesh * CreateSphere(vec3f const &Radii=vec3f(0.5f), uint const Slices=32, uint const Stacks=16)
Definition: CGeometryCreator.cpp:336
vec2< f32 > vec2f
Definition: SVector2.h:558
Definition: CSimpleMesh.h:33
vec3< f32 > vec3f
Definition: SVector3.h:634
unsigned int uint
Definition: ionTypes.h:99
static vector< CSimpleMesh * > LoadOBJFile(string const &FileName, string const &Path="")
Definition: CGeometryCreator.cpp:550
float f32
Definition: ionTypes.h:94
Definition: CGeometryCreator.h:12
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
static CSimpleMesh * CreateSkySphere()
Definition: CGeometryCreator.cpp:399
static CSimpleMesh * CreateCylinder(f32 const baseRadius=0.2f, f32 const topRadius=0.2f, f32 const height=1.f, uint const slices=32, uint const stacks=4)
Definition: CGeometryCreator.cpp:74
static CSimpleMesh * CreatePlane(vec2f const &Size=vec2f(1.f))
Definition: CGeometryCreator.cpp:411
static CSimpleMesh * CreateScreenTriangle()
Definition: CGeometryCreator.cpp:477
static CSimpleMesh * CreateWafer(f32 const radius=0.5f, uint const Slices=40)
Definition: CGeometryCreator.cpp:444
static void IntersectAndDelete(CSimpleMesh *A, CSimpleMesh const *B, vec3f const &BOffset=0)
Definition: CGeometryCreator.cpp:529
static CSimpleMesh * CreateCube(vec3f const &Size=vec3f(1.f))
Definition: CGeometryCreator.cpp:12
static CSimpleMesh * CreateTorus(f32 const centralRadius=1.f, f32 const innerRadius=0.25f, uint const slices=16, uint const stacks=20)
Definition: CGeometryCreator.cpp:296
static CSimpleMesh * Intersect(CSimpleMesh const *A, CSimpleMesh const *B, vec3f const &AOffset=0, vec3f const &BOffset=0)
Definition: CGeometryCreator.cpp:495