HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GR_ShapeFactory.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: GR_ShapeFactory ( GR Library, C++)
7  *
8  * COMMENTS:
9  * Generates basic shapes in the form of RE_Geometry objects.
10  * Wireframe versions are connectivity group RE_GEO_WIRE_IDX.
11  * Shaded versions (if applicable) are in RE_GEO_SHADED_IDX.
12  */
13 #ifndef GR_ShapeFactory_h
14 #define GR_ShapeFactory_h
15 
16 #include "GR_API.h"
17 #include <UT/UT_UniquePtr.h>
18 #include <UT/UT_VectorTypes.h>
19 #include <RE/RE_RenderContext.h>
20 
21 class RE_Render;
22 class RE_RenderContext;
23 class RE_Geometry;
24 class RV_Geometry;
25 
26 namespace GR_ShapeFactory
27 {
28 
30 {
34 };
35 
37  UT_Vector3F pos,
38  const char *cache_name = NULL);
40  const UT_Vector3FArray &pos,
41  const char *cache_name = NULL);
42 
47  const char *cache_name = NULL);
48 
52  const char *cache_name = NULL);
53 
55  UT_Vector3F p0,
56  UT_Vector3F p1,
57  const char *cache_name = NULL);
58 
61  UT_Vector2F radius,
63  const char *cache_name = NULL);
64 
67  UT_Vector3F radius,
68  const char *cache_name = NULL);
69 
70 // 3D L, each axis colored. Wireframe only.
73  fpreal scale,
74  const char *cache_name = NULL);
75 // 3D +. Wireframe Only.
78  fpreal scale,
79  const char *cache_name = NULL);
80 // simple bone
82  const char *cache_name = NULL);
83 
84 // solved bone, a few more kinks in the middle
86  const char *cache_name = NULL);
87 
88 GR_API extern bool buildBox(RE_RenderContext r,
91  UT_UniquePtr<RV_Geometry> &out_geo);
92 
94  UT_Vector3F p0,
95  UT_Vector3F p1,
96  UT_UniquePtr<RV_Geometry> &out_geo);
97 
100  UT_Vector2F radius,
102  UT_UniquePtr<RV_Geometry> &out_geo);
103 
104 GR_API extern bool buildBone(RE_RenderContext r,
105  UT_UniquePtr<RV_Geometry> &out_geo);
106 }
107 
108 #endif
A collection of vertex arrays defining a geometry object. This class acts as a wrapper around multipl...
Definition: RE_Geometry.h:53
GT_API const UT_StringHolder cache_name
Object that represents drawable geometry. This object holds vertex, instancing and index buffers for ...
Definition: RV_Geometry.h:164
GR_API RE_Geometry * buildPoint(RE_Render *r, UT_Vector3F pos, const char *cache_name=NULL)
GR_API RE_Geometry * buildLine(RE_Render *r, UT_Vector3F p0, UT_Vector3F p1, const char *cache_name=NULL)
Temporary container for either a RV_Render and an RE_Render.
std::unique_ptr< T, Deleter > UT_UniquePtr
A smart pointer for unique ownership of dynamically allocated objects.
Definition: UT_UniquePtr.h:39
GR_API RE_Geometry * buildPointCloud(RE_Render *r, const UT_Vector3FArray &pos, const char *cache_name=NULL)
GA_API const UT_StringHolder scale
GR_API RE_Geometry * buildAxes(RE_Render *r, UT_Vector3F center, fpreal scale, const char *cache_name=NULL)
GR_API RE_Geometry * buildGrid(RE_Render *r, UT_Vector3F center, UT_Vector2F size, Orientation orient, const char *cache_name=NULL)
GR_API RE_Geometry * buildBone(RE_Render *r, const char *cache_name=NULL)
GR_API RE_Geometry * buildNull(RE_Render *r, UT_Vector3F center, fpreal scale, const char *cache_name=NULL)
#define GR_API
Definition: GR_API.h:10
GR_API RE_Geometry * buildBox(RE_Render *r, UT_Vector3F center, UT_Vector3F size, const char *cache_name=NULL)
GA_API const UT_StringHolder orient
GLsizeiptr size
Definition: glcorearb.h:664
fpreal64 fpreal
Definition: SYS_Types.h:277
GR_API RE_Geometry * buildSolverBone(RE_Render *r, const char *cache_name=NULL)
GR_API RE_Geometry * buildCircle(RE_Render *r, UT_Vector3F center, UT_Vector2F radius, Orientation orient, const char *cache_name=NULL)
GLboolean r
Definition: glcorearb.h:1222
GR_API RE_Geometry * buildSphere(RE_Render *r, UT_Vector3F center, UT_Vector3F radius, const char *cache_name=NULL)