DI-Guy SDK Documentation  13.2
diguyGraphicsShape.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2016 VT MAK
4  ** All rights reserved.
5  *********************************************************************/
6 
7 /*********************************************************************/
14 #ifndef __diguyGraphicsShape_H
15 #define __diguyGraphicsShape_H
16 
17 #ifdef SWIG
18 %module diguyGraphicsShape
19 #else
20 #define CPLUSPLUS_ONLY
21 #endif
22 
23 #ifdef CPLUSPLUS_ONLY
24 #include <diguy_constants.h>
25 
26 class bdiShape;
27 class diguyCharacter;
28 class diguyGraphicsFile;
29 class diguyGraphicsLink;
30 class diguyGraphicsMesh;
31 class diguyGraphicsShape;
32 class diguyGraphicsState;
33 
34 #endif
35 
36 #include <declspec_diguy.h>
37 
38 /*****************************************************************************/
52 class BDI_DECLSPEC_diguy diguyGraphicsShape
53 {
54 
55 public:
56 
57 
58 /*****************************************************************************/
71  /*l
72  *b Description:
73  **
74  ** This function returns the name of the shape. The returned pointer
75  ** will never be NULL.
76  **
77  *b Returns:
78  **
79  ** name of the shape as C string
80  */
81  const char* get_name();
82 
83  /*l
84  *b Description:
85  **
86  ** All shapes are assigned a unique identifier, or uid. This function
87  ** returns this shape's uid.
88  **
89  ** *Note*: unique identifiers can change between DI-Guy runs.
90  **
91  *b Returns:
92  **
93  ** unique identifier of object
94  */
95  long get_uid();
96 
97  /*l
98  *b Description:
99  **
100  ** This function returns a pointer to the diguyCharacter to which this
101  ** shape belongs.
102  **
103  *b Returns:
104  **
105  ** pointer of type diguyCharacter
106  */
107  diguyCharacter* get_character();
108 
109 
110  /*l
111  *b Description:
112  **
113  ** This function returns the name of the shape set of which this shape
114  ** is a part.
115  **
116  ** A shape set is a collection of shapes that are related, coming from
117  ** a set of related geometry files, sometimes one file per LOD.
118  **
119  ** A shape is a collection of parts each representing the same thing
120  ** at varying levels of detail.
121  **
122  ** For example, in its config files DI-Guy has a shape set named
123  ** "firefighter", which references five OpenFlight files named
124  ** firefighter_LOD1.flt through firefighter_LOD5.flt. The firefighter
125  ** shape set contains separate shapes for the head, arms, legs, etc.,
126  ** at five different levels of detail.
127  **
128  ** Use the function get_shape_set_filename_for_lod() to get the actual
129  ** geometry filenames that should be used for each LOD.
130  **
131  *b Returns:
132  **
133  ** shape set of shape as C string
134  */
135  const char* get_shape_set_name();
136 
137  /*l
138  *b Description:
139  **
140  ** This function returns the name of the shape. This name identifies
141  ** which pieces of geometry out of the shape set should comprise the
142  ** shape.
143  **
144  *b Returns:
145  **
146  ** shape name of shape as C string
147  */
148  const char* get_shape_set_shape_name();
149 
150  /*l
151  *b Description:
152  **
153  ** This function returns the name of the link to which this shape is
154  ** typically attached.
155  **
156  ** Use the function get_link() to get a pointer to the actual link to
157  ** which this shape is attached.
158  **
159  *b Returns:
160  **
161  ** name of recommended attachment link as C string
162  */
163  const char* get_recommended_attachment_link_name();
164 
165  /*l
166  *b Description:
167  **
168  ** This function returns how many LODs this shape has. This will be a
169  ** number between 1 and 7.
170  **
171  *b Returns:
172  **
173  ** number of LODs
174  */
175  int get_num_lods();
176 
177 #ifdef CPLUSPLUS_ONLY
178 
179  /*l
180  *b Description:
181  **
182  ** This function returns the LOD ranges of this shape. The returned
183  ** pointer points to an array of eight floats, which represent ranges
184  ** in meters at which LODs should be shown.
185  **
186  *b Returns:
187  **
188  ** LOD ranges
189  **
190  *b Only Callable From C++
191  */
192  float* get_lod_ranges();
193 
194 #endif
195 
196  /*l
197  *b Description:
198  **
199  ** This function returns the most recent lod setting as set by
200  ** set_graphics_lod(), or as set by
201  ** diguyCharacter::set_graphics_lod().
202  **
203  *b Returns:
204  **
205  ** LOD index; integer from 1 to get_num_lods()
206  */
207  int get_graphics_lod();
208 
209  /*l
210  *b Description:
211  **
212  ** This function returns the filename of the geometry file from which
213  ** the shape is read for a specific LOD.
214  **
215  *b Arguments:
216  **
217  *a lod - level of detail; a number between 1 and get_num_lods()
218  **
219  *b Returns:
220  **
221  ** geometry filename as C string
222  */
223  const char* get_shape_set_filename_for_lod(int lod);
224 
225  /*l
226  *b Description:
227  **
228  ** This function returns the number of low-level geometry meshes that
229  ** comprise this shape.
230  **
231  *b Arguments:
232  **
233  *a lod - level of detail; a number between 1 and get_num_lods()
234  **
235  *b Returns:
236  **
237  ** number of meshes in this shape
238  */
239  int get_num_meshes(int lod);
240 
241  /*l
242  *b Description:
243  **
244  ** This function returns a pointer to one of the low-level geometry
245  ** mesh objects that comprise this shape.
246  **
247  *b Arguments:
248  **
249  *a index - index of mesh; a number between 0 and get_num_meshes() - 1
250  *a lod - level of detail; a number between 1 and get_num_lods()
251  **
252  *b Returns:
253  **
254  ** pointer to object of type diguyGraphicsMesh; NULL on error
255  */
256  diguyGraphicsMesh* get_mesh_at_index_for_lod(int index, int lod);
257 
258  /*l
259  *b Description:
260  **
261  ** This function returns a pointer to the link to which this shape is
262  ** actually attached.
263  **
264  *b Arguments:
265  **
266  *a index - index of mesh; a number between 0 and get_num_meshes() - 1
267  *a lod - level of detail; a number between 1 and get_num_lods()
268  **
269  *b Returns:
270  **
271  ** pointer to object of type diguyGraphicsMesh; NULL on error
272  */
273  diguyGraphicsLink* get_link();
274 
275  /*l
276  *b Description:
277  **
278  ** This function returns the name of the DI-Guy motion data variable
279  ** that controls whether this shape should be visible.
280  **
281  ** The returned pointer will be NULL if there is no associated
282  ** variable.
283  ** This visiblity can be overridden by calling diguyGraphicsLink::set_shape_switch_override()
284  ** on the parent link.
285  **
286  *b Returns:
287  **
288  ** name of the variable; NULL if there is no variable
289  */
290  const char* get_switch_var_name();
291 
292  /*l
293  *b Description:
294  **
295  ** This function returns the value of the DI-Guy motion data variable
296  ** for which the shape should be visible.
297  **
298  ** Note that the variable in the motion data is a float, but gets cast
299  ** to an integer and compared against this number during shape
300  ** updates.
301  **
302  *b Returns:
303  **
304  ** number representing value for which shape should be visible
305  */
306  int get_switch_value();
307 
308  /*l
309  *b Description:
310  **
311  ** This function returns whether this shape should currently be hidden
312  ** or shown, based on the value of the shape's switch variable (if
313  ** any).
314  **
315  *b Returns:
316  **
317  ** 1 if shape is hidden, 0 if not
318  */
319  int get_is_hidden() const;
320 
322  int set_is_hidden(int hidden);
323 
326  const char * get_class_type() const;
327 
330  const char * get_object_type() const;
331 
333  const char * get_material_type() const;
334 
336  int get_is_pbr_ready() const;
337 
338  /*l
339  *b Description:
340  **
341  ** This function returns the geometry file from which geometry for the
342  ** shape was read. Each LOD of the shape may potentially come from a
343  ** different file.
344  **
345  ** Note that if a diguyGraphicsFile create function has not been
346  ** registered with a call to diguy_graphics_set_file_create_func(),
347  ** this function will return NULL.
348  **
349  *b Arguments:
350  **
351  *a lod - level of detail; a number between 1 and get_num_lods()
352  **
353  *b Returns:
354  **
355  ** object of type diguyGraphicsFile
356  */
357  diguyGraphicsFile* get_diguy_graphics_file(int lod);
358 
359 #ifdef CPLUSPLUS_ONLY
360 
361  /*l
362  *b Description:
363  **
364  ** This function returns a pointer to an object that represents the
365  ** geometry for the shape. The returned object is an object that has
366  ** been returned by a previous call to diguyGraphicsFile::find_part(),
367  ** and can be safely cast to the type of object that has been so
368  ** returned.
369  **
370  ** Note that if a diguyGraphicsFile create function has not been
371  ** registered with a call to diguy_graphics_set_file_create_func(),
372  ** this function will return NULL.
373  **
374  *b Arguments:
375  **
376  *a lod - level of detail; a number between 1 and get_num_lods()
377  **
378  *b Returns:
379  **
380  ** generic object which must be cast appropriately
381  **
382  *b Only Callable From C++
383  */
384  void* get_diguy_graphics_file_part(int lod);
385 
386 #endif
387 
388  /*l
389  *b Description:
390  **
391  ** Some shapes have meshes that have multiple selectable graphics
392  ** states, including materials and textures. This function returns
393  ** the value that specifies which graphics state to use for meshes of
394  ** this shape.
395  **
396  ** This is different than get_switch_value(), which returns the value
397  ** of the switch that controls whether or not meshes of this state are
398  ** shown.
399  **
400  *b Returns:
401  **
402  ** value of state switch; -1 if there is no state switch
403  */
404  int get_graphics_state_switch_index();
405 
406  /*l
407  *b Description:
408  **
409  ** Returns the number of switched graphics states available to this
410  ** shape. See get_graphics_state_switch_index().
411  **
412  *b Returns:
413  **
414  ** number of switched graphics states
415  */
416  int get_num_switched_graphics_states();
417 
418  /*l
419  *b Description:
420  **
421  ** Returns the graphics state associated with the passed switch value.
422  **
423  *b Returns:
424  **
425  ** pointer to type diguyGraphicsState
426  */
427  diguyGraphicsState* get_switched_graphics_state(int switch_value = -1);
428 
430  int set_state_switch_index(int index);
431 
432  /*l
433  *b Description:
434  **
435  ** Returns in the passed pointers the unique color of this shape. All
436  ** shapes in a DI-Guy appearance are assigned a unique RGB color that
437  ** can be used in pick/selection operations.
438  **
439  ** Also see diguyScenario::map_color_to_impact().
440  **
441  ** See programming_examples/diguy_graphics_api/ogl_examples/intersection_test
442  ** for an example of its usage.
443  **
444  *b Returns:
445  **
446  ** 0 on success, -1 on failure
447  */
448  int get_unique_color(unsigned char* r, unsigned char* g, unsigned char* b);
449 
450  /*l
451  *b Description:
452  **
453  ** This function identifies if this shape has skinned data. Scene
454  ** graph renderers will need to know this in the build phase to help
455  ** set up the matrix data shader functionality.
456  **
457  *b Returns:
458  **
459  ** 1 if contains at lease one file with skinned data, 0 if not
460  */
461  int get_contains_skinned_file();
462 
463 /***************************************************************************************
464  *2 Per shape material uniform API
465  **/
466  /*l
467  *b Description:
468  **
469  ** By default DI-Guy provides three 4 float uniforms at the shape
470  ** level that can be used by end users to customize the appearance of
471  ** characters via shaders and misc textures. You can see a
472  ** demonstration of this in the Exface_sales_demo.dss file where an
473  ** additional texture is used. The uniforms are named:
474  **
475  *- -"ufrm_blood_color"
476  *- -"ufrm_grime_color"
477  *- -"ufrm_glow_color"
478  **
479  *b Example:
480  **
481  *e local character = this_scenario:get_character_at_index(0);
482  *e local link = character:get_link_at_index(0);
483  *e local shape = link:find_shape_by_class_type("head");
484  *e shape:set_material_parameter_4f("ufrm_blood_color",1,.1,.1,.5, 1);
485  */
486  int set_material_parameter_4f(const char* parameter_name,
487  float x, float y, float z, float w,
488  float blend_time = 0.0);
489 
490  /*l
491  *b Description:
492  **
493  ** Allow access to the current values of a material parameter, accounting
494  ** for value blending. Returns -1 if the parameter can't be found.
495  */
496  int get_material_parameter_4f(const char* parameter_name,
497  float* x, float* y, float* z, float* w);
498 
499 /***************************************************************************************
500  *2 Texture Variation API
501  **/
502 
503  /*l
504  *b Description:
505  **
506  ** Returns a char * of length get_variation_texture_size() that represents
507  ** the pixels in a unique per shape texture. Typically a Retained mode
508  ** renderer would need to use this to load a state node with the texture
509  ** see diguyOsgGraphicsShape.cpp for an example. For an immediate mode
510  ** renderer we push the texture to the object via update_variation_texture()
511  */
512  unsigned char * get_variation_texture();
513 
515  int get_variation_texture_size();
516 
518  static int get_shared_variation_texture_size();
519 
521  int get_num_variations();
522 
524  const char * get_variation_name(int variation_index);
525 
527  int set_variation_index(int variation_index);
528 
530  int get_has_custom_variation();
531 
533  int get_num_variation_components();
534 
536  const char * get_variation_component_name(int index);
537 
539  int get_variation_component_row(const char * name);
540 
543  int set_variation_component_value(int index, float color_shift_r, float color_shift_g, float color_shift_b);
544 
547  int get_variation_texture_row();
548 
550  void set_variation_texture_data(unsigned char * texture_data);
551 
552 #ifdef CPLUSPLUS_ONLY
553 
554  /*l
555  *b Description:
556  **
557  ** This function is typically called by scene graph renderers as part
558  ** of diguyGraphicsShape::update(). Scene graph renderers should
559  ** queue up this data to be sent to the graphics card at the
560  ** appropriate time.
561  **
562  ** Note that the format of the data in mat_data will be affected by
563  ** the bdiGraphicsInitGraphicsAPI variable transpose_shader_matrices
564  ** value.
565  **
566  *b Callable From:
567  **
568  *- C++
569  */
570  int get_shader_matrix_data(int* num_matrixes, const float** matrix_data);
571 
572 #endif
573 
574  /*l
575  *b Description:
576  **
577  ** Returns the transpose state of the shader matrices.
578  **
579  *b Returns:
580  **
581  ** 1 if shader matrices are transposed, 0 otherwise.
582  */
583  int get_are_shader_matrices_transposed();
584 
585 
586 /*****************************************************************************/
598 #ifdef CPLUSPLUS_ONLY
599 
600  /*l
601  *b Description:
602  **
603  ** This function will be called by DI-Guy when it is time for
604  ** renderer-specific shape objects to be created. All information
605  ** necessary to build the shape should be available via the Accessor
606  ** Functions above when this function is called.
607  **
608  ** The build() function for the link to which a shape is attached
609  ** will be called before the shape's build() function.
610  **
611  *i Immediate Mode:
612  **
613  ** Immediate mode renderers can override this function, to create a
614  ** pre-compiled object that expedites the draw(). Display lists in
615  ** OpenGL are an example of this.
616  **
617  *i Scene Graph:
618  **
619  ** Scene graph renderers usually do override this function, to create
620  ** scene graph nodes that will hold geometry nodes of meshes attached
621  ** to the shape.
622  **
623  ** The following nodes are typically created:
624  **
625  *- - a switch node to control showing and hiding of the shape
626  *- - an LOD node to control which meshes are shown due to
627  *- LOD calculations
628  *- - a geometry parent or group-type object to which mesh
629  *- nodes can be attached
630  **
631  ** The scene graph nodes created by this function should be attached
632  ** to the nodes of the link to which the shape is attached. Use the
633  ** get_link() function to get a pointer to the link.
634  **
635  ** In addition, the scene graph objects of meshes attached to the
636  ** shape should be retrieved and attached to the shape's nodes. Use
637  ** the get_mesh_at_index_for_lod() function to get pointers to the
638  ** meshes.
639  **
640  *b Callable From:
641  **
642  *- - N/A (automatically called by DI-Guy Graphics API during
643  *- the Build Stage)
644  */
645  virtual void build();
646 
647  /*l
648  *b Description:
649  **
650  ** This function will be called by DI-Guy when it is time for the
651  ** renderer-specific shape objects created during the build() call to
652  ** be destroyed.
653  **
654  ** The unbuild() function for the shape will be called before the
655  ** unbuild() function of the link to which the shape is attached.
656  **
657  *i Immediate Mode:
658  **
659  ** Scene graph renderers can override this function, to destroy the
660  ** scene graph nodes created by build().
661  **
662  *i Scene Graph:
663  **
664  ** Scene graph renderers usually do override this function, to
665  ** destroy the scene graph nodes created by build().
666  **
667  *b Callable From:
668  **
669  *- - N/A (automatically called by DI-Guy Graphics API during
670  *- the Unbuild Stage)
671  */
672  virtual void unbuild();
673 
674  /*l
675  *b Description:
676  **
677  ** This function will be called by DI-Guy when it is time for
678  ** renderer-specific shape objects created during the build() call to
679  ** be updated with new data.
680  **
681  ** Shape updates control whether the shape is visible based on motion
682  ** data. The DI-Guy Graphics software looks at the switch value and
683  ** calls show() or hide() as appropriate, so it is likely that this
684  ** function does not need to be overridden in immediate mode.
685  **
686  ** The update() function for the link to which a shape is attached
687  ** will be called before the shape's update() function.
688  **
689  *i Immediate Mode:
690  **
691  ** Immediate mode renderers usually do not override this function.
692  **
693  *i Scene Graph:
694  **
695  ** Scene graph renderers should override this function if they are
696  ** supporting skinned characters. Each skinned shape can potentially
697  ** have different uniforms that need to be sent to the video card; see
698  ** get_shader_matrix_data().
699  **
700  *b Callable From:
701  **
702  *- - N/A (automatically called by DI-Guy Graphics API during
703  *- Update Stage)
704  */
705  virtual void update();
706 
707  /*l
708  *b Description:
709  **
710  ** This function will be called by DI-Guy when the shape should be
711  ** shown, typically due to a change in the motion data that controls
712  ** the switch. See get_switch_var_name() and get_switch_value().
713  **
714  *i Immediate Mode:
715  **
716  ** Immediate mode renderers usually do not override this function.
717  ** DI-Guy does not call the draw() function of hidden shapes.
718  **
719  *i Scene Graph:
720  **
721  ** Scene graph renderers usually do override this function, to update
722  ** the state of the switch node created during the build() call.
723  **
724  *b Callable From:
725  **
726  *- - N/A (automatically called by DI-Guy Graphics API during
727  *- Update Stage)
728  */
729  virtual void show();
730 
731  /*l
732  *b Description:
733  **
734  ** This function will be called by DI-Guy when the shape should be
735  ** hidden, typically due to a change in the motion data that controls
736  ** the switch. See get_switch_var_name() and get_switch_value().
737  **
738  *i Immediate Mode:
739  **
740  ** Immediate mode renderers usually do not override this function.
741  ** DI-Guy does not call the draw() function of hidden shapes.
742  **
743  *i Scene Graph:
744  **
745  ** Scene graph renderers usually do override this function, to update
746  ** the state of the switch node created during the build() call.
747  **
748  *b Callable From:
749  **
750  *- - N/A (automatically called by DI-Guy Graphics API during
751  *- Update Stage)
752  */
753  virtual void hide();
754 
755 
756  /*l
757  *b Description:
758  **
759  ** This function will be called by DI-Guy when it is time for the
760  ** geometry of this shape to be drawn.
761  **
762  *i Immediate Mode:
763  **
764  ** Immediate mode renderers usually do not override this function.
765  ** The actual draw calls happen in diguyGraphicsMesh::draw() calls.
766  **
767  *i Scene Graph:
768  **
769  ** Scene graph renderers usually do not override this function;
770  ** drawing is handled automatically by scene graphs.
771  **
772  *b Callable From:
773  **
774  *- - N/A (automatically called by DI-Guy Graphics API during
775  *- Draw Stage)
776  */
777  virtual void draw(int lod);
778 
779  /*l
780  *b Description:
781  **
782  ** This function will be called by DI-Guy when the LOD ranges of this
783  ** shape need to be updated after the shape has initially been built
784  ** in the Build Stage.
785  **
786  *b Arguments:
787  **
788  *a lod_ranges - new lod ranges for this shape
789  **
790  ** See diguyScenario::set_default_lod_ranges() for a description of
791  ** what will be in the lod_ranges argument.
792  **
793  *i Immediate Mode:
794  **
795  ** Immediate mode renderers usually do not override this function.
796  ** Instead, they use the lod passed into the draw() function.
797  **
798  *i Scene Graph:
799  **
800  ** Scene graph renderers can override this function, to update the
801  ** ranges of LOD nodes created in the Build Stage, if any.
802  **
803  ** If there were LOD-type nodes created in the Build Stage, their
804  ** ranges should be updated based on the passed values.
805  **
806  ** If no LOD-type nodes were created in the Build Stage, this
807  ** function should have no effect.
808  **
809  ** Typically only one of set_graphics_lod_ranges() or
810  ** set_graphics_lod() is implemented.
811  **
812  *b Callable From:
813  **
814  *- - N/A (automatically called by DI-Guy Graphics API when the
815  *- DI-Guy API function diguyCharacter::set_lod_ranges() is
816  *- called)
817  */
818  virtual void set_graphics_lod_ranges(float* ranges);
819 
820  /*l
821  *b Description:
822  **
823  ** This function will be called by DI-Guy when the LOD of this link
824  ** is "manually" set by a diguyCharacter::set_graphics_lod() function
825  ** call.
826  **
827  *i Immediate Mode:
828  **
829  ** Immediate mode renderers usually do not override this function.
830  ** Instead, they use the lod passed into the draw() function.
831  **
832  *i Scene Graph:
833  **
834  ** Scene graph renderers sometimes override this function, to update
835  ** the state of switch nodes created in the Build Stage.
836  **
837  ** Typically only one of set_graphics_lod_ranges() or
838  ** set_graphics_lod() is implemented.
839  **
840  *b Callable From:
841  **
842  *- - N/A (automatically called by DI-Guy Graphics API when the
843  *- DI-Guy API function diguyCharacter::set_graphics_lod() is
844  *- called)
845  */
846  virtual void set_graphics_lod(int lod);
847 
848 
849  /*l
850  *b Description:
851  **
852  ** Pushes a char * pixel buffer of length num_pixels that represents
853  ** the unique per shape texture. Typically a Immediate mode renderer
854  ** would need to use this to create or update a texture
855  ** see diguyOglGraphicsShape.cpp for an example. For an retained mode
856  ** renderer we have get_variation_texture() as an accessor.
857  **
858  *b Callable From:
859  **
860  *- - N/A (automatically called by DI-Guy Graphics API during
861  *- Build Stage)
862  */
863  virtual void update_variation_texture(int num_pixels, unsigned char * pixel_data);
864 
865  /*l
866  *b Description:
867  **
868  ** Returns the unique color of the character links. All links in a
869  ** DI-Guy appearance are assigned a unique RGB color that can be used
870  ** in pick/selection operations. The data returned in color_data is
871  ** an array of length num_colors with 4 floats per entry (r, g, b, a).
872  **
873  ** See programming_examples/diguy_graphics_api/osg_2_examples/intersection_test
874  ** for an example of its usage.
875  **
876  *b Returns:
877  **
878  ** 0 on success, -1 on failure
879  */
880  int get_bind_color_array(int* num_colors, const float** color_data);
881 
882  /*b Description:
883  **
884  ** This function will be called by DI-Guy when the the character changes
885  ** instancing state. This allows additional work to be done to manage
886  ** instancing. Note this hasn't been needed, for any of our sample implementations.
887  */
888  virtual void instancing_state_changed(int val);
889 
890 #endif
891 
892 #ifdef CPLUSPLUS_ONLY
893 
894  // EXPERIMENTAL
895  // FIXME: Added to access quats directly instead of shader matrices
896  // for Unity optimization. [Marc 11/22/2013]
897  int get_link_to_matrix_table(int* num_matrices, const float** lookup_data);
898 
900  int get_bone_index_from_link_index(int link_index);
901 
902 #endif
903 
905  int get_has_offset_matrix() const;
906 
908  int get_offset_matrix_4x4_ptr(float* matrix, int transpose = 0) const;
909 
911  /*l
912  *b Description:
913  **
914  ** This function fills out the passed float array with the
915  ** character-local-coordinate system transformation matrix of this
916  ** shape, will only be different from it's parent link if it has an offset matrix.
917  */
918  int get_local_transformation_matrix_4x4_ptr(float* matrix, int transpose = 0) const;
919 
921  int get_bounding_box(float * bbox_min_x, float * bbox_min_y, float * bbox_min_z,
922  float * bbox_max_x, float * bbox_max_y, float * bbox_max_z);
923 
924 /****************************************************************************/
925 /****************************************************************************/
939  //int get_has_offset_translation();
940 
941  //int get_offset_translation(float* tx, float* ty, float* tz);
942 
943  //int get_has_offset_rotation();
944 
945  //int get_offset_rotation(float* rz, float* rx, float* ry);
946 
947  //int get_has_offset_scale();
948 
949  //int get_offset_scale(float* sx, float* sy, float* sz);
950 
951 /****************************************************************************/
952 /****************************************************************************/
953 
958 #ifdef CPLUSPLUS_ONLY
959 
960  bdiShape* get_scripted_object() {return m_scripted_object;}
961 
962 protected:
963 
964  /*l
965  ** A protected constructor. Constructors are called automatically
966  ** by DI-Guy.
967  */
968  diguyGraphicsShape(void* internal_data);
969 
970  /*l
971  ** A protected destructor. Destructors are called automatically
972  ** by DI-Guy.
973  */
974  virtual ~diguyGraphicsShape();
975 
976 private:
977 
978  /*l
979  ** A pointer to internal data.
980  */
981  bdiShape* m_scripted_object;
982 
983  friend class bdiShape;
984  friend class bdiGraphicsFactory;
985 
986 #endif
987 
988 };
989 
990 
991 #endif /* __diguyGraphicsShape_H */
992 
A class that represents a shared material/textures combination.
Definition: diguyGraphicsState.h:44
Definition: diguyGraphicsFile.h:35
A class that represents a shared mesh object.
Definition: diguyGraphicsMesh.h:80
The class that represents a DI-Guy Entity in the world.
Definition: diguyCharacter.h:81
A class that represents the unique per-character non-shared mesh object. DI-Guy encapsulates its text...
Definition: diguyGraphicsShape.h:51