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  float const baseRadius = 0.2f,
21  float const topRadius = 0.2f,
22  float const height = 1.f,
23  uint const slices = 32,
24  uint const stacks = 4);
25 
26  static CSimpleMesh * CreateDisc(
27  float const innerRadius = 0.1f,
28  float const outerRadius = 0.5f,
29  float const height = 0.2f,
30  uint const slices = 32,
31  uint const stacks = 4);
32 
33  static CSimpleMesh * CreateTorus(
34  float const centralRadius = 1.f,
35  float 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  float 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<pair<string, CSimpleMesh *>> LoadOBJFileWithNames(string const & FileName, string const & Path = "");
59  static vector<CSimpleMesh *> LoadOBJFile(string const & FileName, string const & Path = "");
60 
61  };
62 
63  }
64 }
static CSimpleMesh * CreateSphere(vec3f const &Radii=vec3f(0.5f), uint const Slices=32, uint const Stacks=16)
Definition: CGeometryCreator.cpp:336
Definition: CSimpleMesh.h:33
vec3< float > vec3f
Definition: vec3.h:638
static vector< CSimpleMesh * > LoadOBJFile(string const &FileName, string const &Path="")
Definition: CGeometryCreator.cpp:623
vec2< float > vec2f
Definition: vec2.h:574
Definition: CGeometryCreator.h:12
Definition: CCatmullRomAdvancedSplineInterpolator.h:7
unsigned int uint
Definition: ionTypes.h:42
static CSimpleMesh * CreateSkySphere()
Definition: CGeometryCreator.cpp:399
static CSimpleMesh * CreatePlane(vec2f const &Size=vec2f(1.f))
Definition: CGeometryCreator.cpp:411
static CSimpleMesh * CreateScreenTriangle()
Definition: CGeometryCreator.cpp:477
static CSimpleMesh * CreateTorus(float const centralRadius=1.f, float const innerRadius=0.25f, uint const slices=16, uint const stacks=20)
Definition: CGeometryCreator.cpp:296
static CSimpleMesh * CreateCylinder(float const baseRadius=0.2f, float const topRadius=0.2f, float const height=1.f, uint const slices=32, uint const stacks=4)
Definition: CGeometryCreator.cpp:74
static CSimpleMesh * CreateWafer(float const radius=0.5f, uint const Slices=40)
Definition: CGeometryCreator.cpp:444
static CSimpleMesh * CreateDisc(float const innerRadius=0.1f, float const outerRadius=0.5f, float const height=0.2f, uint const slices=32, uint const stacks=4)
Definition: CGeometryCreator.cpp:165
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 * Intersect(CSimpleMesh const *A, CSimpleMesh const *B, vec3f const &AOffset=0, vec3f const &BOffset=0)
Definition: CGeometryCreator.cpp:495
static vector< pair< string, CSimpleMesh * > > LoadOBJFileWithNames(string const &FileName, string const &Path="")
Definition: CGeometryCreator.cpp:550