DI-Guy SDK Documentation  13.5
diguyGraphicsShape.h
Go to the documentation of this file.
1 
2 /*********************************************************************
3  ** Copyright (c) 1992-2020 MAK Technologies, Inc.
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 
210  float get_graphics_lod_fraction();
211 
213  bool get_lod_fades_out(int lod);
214 
215  /*l
216  *b Description:
217  **
218  ** This function returns the filename of the geometry file from which
219  ** the shape is read for a specific LOD.
220  **
221  *b Arguments:
222  **
223  *a lod - level of detail; a number between 1 and get_num_lods()
224  **
225  *b Returns:
226  **
227  ** geometry filename as C string
228  */
229  const char* get_shape_set_filename_for_lod(int lod);
230 
231  /*l
232  *b Description:
233  **
234  ** This function returns the number of low-level geometry meshes that
235  ** comprise this shape.
236  **
237  *b Arguments:
238  **
239  *a lod - level of detail; a number between 1 and get_num_lods()
240  **
241  *b Returns:
242  **
243  ** number of meshes in this shape
244  */
245  int get_num_meshes(int lod);
246 
247  /*l
248  *b Description:
249  **
250  ** This function returns a pointer to one of the low-level geometry
251  ** mesh objects that comprise this shape.
252  **
253  *b Arguments:
254  **
255  *a index - index of mesh; a number between 0 and get_num_meshes() - 1
256  *a lod - level of detail; a number between 1 and get_num_lods()
257  **
258  *b Returns:
259  **
260  ** pointer to object of type diguyGraphicsMesh; NULL on error
261  */
262  diguyGraphicsMesh* get_mesh_at_index_for_lod(int index, int lod);
263 
264  /*l
265  *b Description:
266  **
267  ** This function returns a pointer to the link to which this shape is
268  ** actually attached.
269  **
270  *b Arguments:
271  **
272  *a index - index of mesh; a number between 0 and get_num_meshes() - 1
273  *a lod - level of detail; a number between 1 and get_num_lods()
274  **
275  *b Returns:
276  **
277  ** pointer to object of type diguyGraphicsMesh; NULL on error
278  */
279  diguyGraphicsLink* get_link();
280 
281  /*l
282  *b Description:
283  **
284  ** This function returns the name of the DI-Guy motion data variable
285  ** that controls whether this shape should be visible.
286  **
287  ** The returned pointer will be NULL if there is no associated
288  ** variable.
289  ** This visiblity can be overridden by calling diguyGraphicsLink::set_shape_switch_override()
290  ** on the parent link.
291  **
292  *b Returns:
293  **
294  ** name of the variable; NULL if there is no variable
295  */
296  const char* get_switch_var_name();
297 
298  /*l
299  *b Description:
300  **
301  ** This function returns the value of the DI-Guy motion data variable
302  ** for which the shape should be visible.
303  **
304  ** Note that the variable in the motion data is a float, but gets cast
305  ** to an integer and compared against this number during shape
306  ** updates.
307  **
308  *b Returns:
309  **
310  ** number representing value for which shape should be visible
311  */
312  int get_switch_value();
313 
314  /*l
315  *b Description:
316  **
317  ** This function returns whether this shape should currently be hidden
318  ** or shown, based on the value of the shape's switch variable (if
319  ** any).
320  **
321  *b Returns:
322  **
323  ** 1 if shape is hidden, 0 if not
324  */
325  int get_is_hidden() const;
326 
328  int set_is_hidden(int hidden);
329 
332  const char * get_class_type() const;
333 
336  const char * get_object_type() const;
337 
339  const char * get_material_type() const;
340 
342  int get_is_pbr_ready() const;
343 
344  /*l
345  *b Description:
346  **
347  ** This function returns the geometry file from which geometry for the
348  ** shape was read. Each LOD of the shape may potentially come from a
349  ** different file.
350  **
351  ** Note that if a diguyGraphicsFile create function has not been
352  ** registered with a call to diguy_graphics_set_file_create_func(),
353  ** this function will return NULL.
354  **
355  *b Arguments:
356  **
357  *a lod - level of detail; a number between 1 and get_num_lods()
358  **
359  *b Returns:
360  **
361  ** object of type diguyGraphicsFile
362  */
363  diguyGraphicsFile* get_diguy_graphics_file(int lod);
364 
365 #ifdef CPLUSPLUS_ONLY
366 
367  /*l
368  *b Description:
369  **
370  ** This function returns a pointer to an object that represents the
371  ** geometry for the shape. The returned object is an object that has
372  ** been returned by a previous call to diguyGraphicsFile::find_part(),
373  ** and can be safely cast to the type of object that has been so
374  ** returned.
375  **
376  ** Note that if a diguyGraphicsFile create function has not been
377  ** registered with a call to diguy_graphics_set_file_create_func(),
378  ** this function will return NULL.
379  **
380  *b Arguments:
381  **
382  *a lod - level of detail; a number between 1 and get_num_lods()
383  **
384  *b Returns:
385  **
386  ** generic object which must be cast appropriately
387  **
388  *b Only Callable From C++
389  */
390  void* get_diguy_graphics_file_part(int lod);
391 
392 #endif
393 
394  /*l
395  *b Description:
396  **
397  ** Some shapes have meshes that have multiple selectable graphics
398  ** states, including materials and textures. This function returns
399  ** the value that specifies which graphics state to use for meshes of
400  ** this shape.
401  **
402  ** This is different than get_switch_value(), which returns the value
403  ** of the switch that controls whether or not meshes of this state are
404  ** shown.
405  **
406  *b Returns:
407  **
408  ** value of state switch; -1 if there is no state switch
409  */
410  int get_graphics_state_switch_index();
411 
412  /*l
413  *b Description:
414  **
415  ** Returns the number of switched graphics states available to this
416  ** shape. See get_graphics_state_switch_index().
417  **
418  *b Returns:
419  **
420  ** number of switched graphics states
421  */
422  int get_num_switched_graphics_states();
423 
424  /*l
425  *b Description:
426  **
427  ** Returns the graphics state associated with the passed switch value.
428  **
429  *b Returns:
430  **
431  ** pointer to type diguyGraphicsState
432  */
433  diguyGraphicsState* get_switched_graphics_state(int switch_value = -1);
434 
436  int set_state_switch_index(int index);
437 
438  /*l
439  *b Description:
440  **
441  ** Returns in the passed pointers the unique color of this shape. All
442  ** shapes in a DI-Guy appearance are assigned a unique RGB color that
443  ** can be used in pick/selection operations.
444  **
445  ** Also see diguyScenario::map_color_to_impact().
446  **
447  ** See programming_examples/diguy_graphics_api/ogl_examples/intersection_test
448  ** for an example of its usage.
449  **
450  *b Returns:
451  **
452  ** 0 on success, -1 on failure
453  */
454  int get_unique_color(unsigned char* r, unsigned char* g, unsigned char* b);
455 
456  /*l
457  *b Description:
458  **
459  ** This function identifies if this shape has skinned data. Scene
460  ** graph renderers will need to know this in the build phase to help
461  ** set up the matrix data shader functionality.
462  **
463  *b Returns:
464  **
465  ** 1 if contains at lease one file with skinned data, 0 if not
466  */
467  int get_contains_skinned_file();
468 
469 /***************************************************************************************
470  *2 Per shape material uniform API
471  **/
472  /*l
473  *b Description:
474  **
475  ** By default DI-Guy provides three 4 float uniforms at the shape
476  ** level that can be used by end users to customize the appearance of
477  ** characters via shaders and misc textures. You can see a
478  ** demonstration of this in the Exface_sales_demo.dss file where an
479  ** additional texture is used. The uniforms are named:
480  **
481  *- -"ufrm_blood_color"
482  *- -"ufrm_grime_color"
483  *- -"ufrm_glow_color"
484  **
485  *b Example:
486  **
487  *e local character = this_scenario:get_character_at_index(0);
488  *e local link = character:get_link_at_index(0);
489  *e local shape = link:find_shape_by_class_type("head");
490  *e shape:set_material_parameter_4f("ufrm_blood_color",1,.1,.1,.5, 1);
491  */
492  int set_material_parameter_4f(const char* parameter_name,
493  float x, float y, float z, float w,
494  float blend_time = 0.0);
495 
496  /*l
497  *b Description:
498  **
499  ** Allow access to the current values of a material parameter, accounting
500  ** for value blending. Returns -1 if the parameter can't be found.
501  */
502  int get_material_parameter_4f(const char* parameter_name,
503  float* x, float* y, float* z, float* w);
504 
505 /***************************************************************************************
506  *2 Texture Variation API
507  **/
508 
509  /*l
510  *b Description:
511  **
512  ** Returns a char * of length get_variation_texture_size() that represents
513  ** the pixels in a unique per shape texture. Typically a Retained mode
514  ** renderer would need to use this to load a state node with the texture
515  ** see diguyOsgGraphicsShape.cpp for an example. For an immediate mode
516  ** renderer we push the texture to the object via update_variation_texture()
517  */
518  unsigned char * get_variation_texture();
519 
521  int get_variation_texture_size();
522 
524  static int get_shared_variation_texture_size();
525 
527  int get_num_variations();
528 
530  const char * get_variation_name(int variation_index);
531 
533  int set_variation_index(int variation_index);
534 
536  int get_has_custom_variation();
537 
539  int get_num_variation_components();
540 
542  const char * get_variation_component_name(int index);
543 
545  int get_variation_component_row(const char * name);
546 
549  int set_variation_component_value(int index, float color_shift_r, float color_shift_g, float color_shift_b);
550 
553  int get_variation_texture_row();
554 
556  void set_variation_texture_data(unsigned char * texture_data);
557 
558 #ifdef CPLUSPLUS_ONLY
559 
560  /*l
561  *b Description:
562  **
563  ** This function is typically called by scene graph renderers as part
564  ** of diguyGraphicsShape::update(). Scene graph renderers should
565  ** queue up this data to be sent to the graphics card at the
566  ** appropriate time.
567  **
568  ** Note that the format of the data in mat_data will be affected by
569  ** the bdiGraphicsInitGraphicsAPI variable transpose_shader_matrices
570  ** value.
571  **
572  *b Callable From:
573  **
574  *- C++
575  */
576  int get_shader_matrix_data(int* num_matrixes, const float** matrix_data);
577 
578 #endif
579 
580  /*l
581  *b Description:
582  **
583  ** Returns the transpose state of the shader matrices.
584  **
585  *b Returns:
586  **
587  ** 1 if shader matrices are transposed, 0 otherwise.
588  */
589  int get_are_shader_matrices_transposed();
590 
591 
592 /*****************************************************************************/
604 #ifdef CPLUSPLUS_ONLY
605 
606  /*l
607  *b Description:
608  **
609  ** This function will be called by DI-Guy when it is time for
610  ** renderer-specific shape objects to be created. All information
611  ** necessary to build the shape should be available via the Accessor
612  ** Functions above when this function is called.
613  **
614  ** The build() function for the link to which a shape is attached
615  ** will be called before the shape's build() function.
616  **
617  *i Immediate Mode:
618  **
619  ** Immediate mode renderers can override this function, to create a
620  ** pre-compiled object that expedites the draw(). Display lists in
621  ** OpenGL are an example of this.
622  **
623  *i Scene Graph:
624  **
625  ** Scene graph renderers usually do override this function, to create
626  ** scene graph nodes that will hold geometry nodes of meshes attached
627  ** to the shape.
628  **
629  ** The following nodes are typically created:
630  **
631  *- - a switch node to control showing and hiding of the shape
632  *- - an LOD node to control which meshes are shown due to
633  *- LOD calculations
634  *- - a geometry parent or group-type object to which mesh
635  *- nodes can be attached
636  **
637  ** The scene graph nodes created by this function should be attached
638  ** to the nodes of the link to which the shape is attached. Use the
639  ** get_link() function to get a pointer to the link.
640  **
641  ** In addition, the scene graph objects of meshes attached to the
642  ** shape should be retrieved and attached to the shape's nodes. Use
643  ** the get_mesh_at_index_for_lod() function to get pointers to the
644  ** meshes.
645  **
646  *b Callable From:
647  **
648  *- - N/A (automatically called by DI-Guy Graphics API during
649  *- the Build Stage)
650  */
651  virtual void build();
652 
653  /*l
654  *b Description:
655  **
656  ** This function will be called by DI-Guy when it is time for the
657  ** renderer-specific shape objects created during the build() call to
658  ** be destroyed.
659  **
660  ** The unbuild() function for the shape will be called before the
661  ** unbuild() function of the link to which the shape is attached.
662  **
663  *i Immediate Mode:
664  **
665  ** Scene graph renderers can override this function, to destroy the
666  ** scene graph nodes created by build().
667  **
668  *i Scene Graph:
669  **
670  ** Scene graph renderers usually do override this function, to
671  ** destroy the scene graph nodes created by build().
672  **
673  *b Callable From:
674  **
675  *- - N/A (automatically called by DI-Guy Graphics API during
676  *- the Unbuild Stage)
677  */
678  virtual void unbuild();
679 
680  /*l
681  *b Description:
682  **
683  ** This function will be called by DI-Guy when it is time for
684  ** renderer-specific shape objects created during the build() call to
685  ** be updated with new data.
686  **
687  ** Shape updates control whether the shape is visible based on motion
688  ** data. The DI-Guy Graphics software looks at the switch value and
689  ** calls show() or hide() as appropriate, so it is likely that this
690  ** function does not need to be overridden in immediate mode.
691  **
692  ** The update() function for the link to which a shape is attached
693  ** will be called before the shape's update() function.
694  **
695  *i Immediate Mode:
696  **
697  ** Immediate mode renderers usually do not override this function.
698  **
699  *i Scene Graph:
700  **
701  ** Scene graph renderers should override this function if they are
702  ** supporting skinned characters. Each skinned shape can potentially
703  ** have different uniforms that need to be sent to the video card; see
704  ** get_shader_matrix_data().
705  **
706  *b Callable From:
707  **
708  *- - N/A (automatically called by DI-Guy Graphics API during
709  *- Update Stage)
710  */
711  virtual void update();
712 
713  /*l
714  *b Description:
715  **
716  ** This function will be called by DI-Guy when the shape should be
717  ** shown, typically due to a change in the motion data that controls
718  ** the switch. See get_switch_var_name() and get_switch_value().
719  **
720  *i Immediate Mode:
721  **
722  ** Immediate mode renderers usually do not override this function.
723  ** DI-Guy does not call the draw() function of hidden shapes.
724  **
725  *i Scene Graph:
726  **
727  ** Scene graph renderers usually do override this function, to update
728  ** the state of the switch node created during the build() call.
729  **
730  *b Callable From:
731  **
732  *- - N/A (automatically called by DI-Guy Graphics API during
733  *- Update Stage)
734  */
735  virtual void show();
736 
737  /*l
738  *b Description:
739  **
740  ** This function will be called by DI-Guy when the shape should be
741  ** hidden, typically due to a change in the motion data that controls
742  ** the switch. See get_switch_var_name() and get_switch_value().
743  **
744  *i Immediate Mode:
745  **
746  ** Immediate mode renderers usually do not override this function.
747  ** DI-Guy does not call the draw() function of hidden shapes.
748  **
749  *i Scene Graph:
750  **
751  ** Scene graph renderers usually do override this function, to update
752  ** the state of the switch node created during the build() call.
753  **
754  *b Callable From:
755  **
756  *- - N/A (automatically called by DI-Guy Graphics API during
757  *- Update Stage)
758  */
759  virtual void hide();
760 
761 
762  /*l
763  *b Description:
764  **
765  ** This function will be called by DI-Guy when it is time for the
766  ** geometry of this shape to be drawn.
767  **
768  *i Immediate Mode:
769  **
770  ** Immediate mode renderers usually do not override this function.
771  ** The actual draw calls happen in diguyGraphicsMesh::draw() calls.
772  **
773  *i Scene Graph:
774  **
775  ** Scene graph renderers usually do not override this function;
776  ** drawing is handled automatically by scene graphs.
777  **
778  *b Callable From:
779  **
780  *- - N/A (automatically called by DI-Guy Graphics API during
781  *- Draw Stage)
782  */
783  virtual void draw(int lod);
784 
785  /*l
786  *b Description:
787  **
788  ** This function will be called by DI-Guy when the LOD ranges of this
789  ** shape need to be updated after the shape has initially been built
790  ** in the Build Stage.
791  **
792  *b Arguments:
793  **
794  *a lod_ranges - new lod ranges for this shape
795  **
796  ** See diguyScenario::set_default_lod_ranges() for a description of
797  ** what will be in the lod_ranges argument.
798  **
799  *i Immediate Mode:
800  **
801  ** Immediate mode renderers usually do not override this function.
802  ** Instead, they use the lod passed into the draw() function.
803  **
804  *i Scene Graph:
805  **
806  ** Scene graph renderers can override this function, to update the
807  ** ranges of LOD nodes created in the Build Stage, if any.
808  **
809  ** If there were LOD-type nodes created in the Build Stage, their
810  ** ranges should be updated based on the passed values.
811  **
812  ** If no LOD-type nodes were created in the Build Stage, this
813  ** function should have no effect.
814  **
815  ** Typically only one of set_graphics_lod_ranges() or
816  ** set_graphics_lod() is implemented.
817  **
818  *b Callable From:
819  **
820  *- - N/A (automatically called by DI-Guy Graphics API when the
821  *- DI-Guy API function diguyCharacter::set_lod_ranges() is
822  *- called)
823  */
824  virtual void set_graphics_lod_ranges(float* ranges);
825 
826  /*l
827  *b Description:
828  **
829  ** This function will be called by DI-Guy when the LOD of this link
830  ** is "manually" set by a diguyCharacter::set_graphics_lod() function
831  ** call.
832  **
833  *i Immediate Mode:
834  **
835  ** Immediate mode renderers usually do not override this function.
836  ** Instead, they use the lod passed into the draw() function.
837  **
838  *i Scene Graph:
839  **
840  ** Scene graph renderers sometimes override this function, to update
841  ** the state of switch nodes created in the Build Stage.
842  **
843  ** Typically only one of set_graphics_lod_ranges() or
844  ** set_graphics_lod() is implemented.
845  **
846  *b Callable From:
847  **
848  *- - N/A (automatically called by DI-Guy Graphics API when the
849  *- DI-Guy API function diguyCharacter::set_graphics_lod() is
850  *- called)
851  */
852  virtual void set_graphics_lod(int lod);
853 
854 
855  /*l
856  *b Description:
857  **
858  ** Pushes a char * pixel buffer of length num_pixels that represents
859  ** the unique per shape texture. Typically a Immediate mode renderer
860  ** would need to use this to create or update a texture
861  ** see diguyOglGraphicsShape.cpp for an example. For an retained mode
862  ** renderer we have get_variation_texture() as an accessor.
863  **
864  *b Callable From:
865  **
866  *- - N/A (automatically called by DI-Guy Graphics API during
867  *- Build Stage)
868  */
869  virtual void update_variation_texture(int num_pixels, unsigned char * pixel_data);
870 
871 
872  /*l
873  *b Description:
874  ** creates a decal texture with a name (accessed by get_decal_text()) see sample implementation for a
875  ** render to texture based implementation
876  **/
877  virtual void update_name_texture();
878 
879 
880 /*****************************************************************************/
885  int get_decal_index() const;
889  void set_decal_index(int index);
890 
892  const char* get_decal_text();
893 
894  /*l
895  *b Description:
896  **
897  ** Returns the unique color of the character links. All links in a
898  ** DI-Guy appearance are assigned a unique RGB color that can be used
899  ** in pick/selection operations. The data returned in color_data is
900  ** an array of length num_colors with 4 floats per entry (r, g, b, a).
901  **
902  ** See programming_examples/diguy_graphics_api/osg_2_examples/intersection_test
903  ** for an example of its usage.
904  **
905  *b Returns:
906  **
907  ** 0 on success, -1 on failure
908  */
909  int get_bind_color_array(int* num_colors, const float** color_data);
910 
911  /*b Description:
912  **
913  ** This function will be called by DI-Guy when the the character changes
914  ** instancing state. This allows additional work to be done to manage
915  ** instancing. Note this hasn't been needed, for any of our sample implementations.
916  */
917  virtual void instancing_state_changed(int val);
918 
919 #endif
920 
921 #ifdef CPLUSPLUS_ONLY
922 
923  // EXPERIMENTAL
924  // FIXME: Added to access quats directly instead of shader matrices
925  // for Unity optimization. [Marc 11/22/2013]
926  int get_link_to_matrix_table(int* num_matrices, const float** lookup_data);
927 
929  int get_bone_index_from_link_index(int link_index);
931 #endif
934  int get_has_offset_matrix() const;
935 
937  int get_offset_matrix_4x4_ptr(float* matrix, int transpose = 0) const;
938 
939 
940  /*l
941  *b Description:
942  **
943  ** This function fills out the passed float array with the
944  ** character-local-coordinate system transformation matrix of this
945  ** shape, will only be different from it's parent link if it has an offset matrix.
946  */
947  int get_local_transformation_matrix_4x4_ptr(float* matrix, int transpose = 0) const;
948 
950  int get_bounding_box(float * bbox_min_x, float * bbox_min_y, float * bbox_min_z,
951  float * bbox_max_x, float * bbox_max_y, float * bbox_max_z);
952 
953 
954 /****************************************************************************/
955 /****************************************************************************/
956 
961 #ifdef CPLUSPLUS_ONLY
962 
963  bdiShape* get_scripted_object() {return m_scripted_object;}
964 
965 protected:
966 
967  /*l
968  ** A protected constructor. Constructors are called automatically
969  ** by DI-Guy.
970  */
971  diguyGraphicsShape(void* internal_data);
972 
973  /*l
974  ** A protected destructor. Destructors are called automatically
975  ** by DI-Guy.
976  */
977  virtual ~diguyGraphicsShape();
978 
979 private:
980 
981  /*l
982  ** A pointer to internal data.
983  */
984  bdiShape* m_scripted_object;
985 
986  friend class bdiShape;
987  friend class bdiGraphicsFactory;
988 
989 #endif
990 
991 };
992 
993 
994 #endif /* __diguyGraphicsShape_H */
995 
A class that represents a shared material/textures combination.
Definition: diguyGraphicsState.h:45
Definition: diguyGraphicsFile.h:35
A class that represents a shared mesh object.
Definition: diguyGraphicsMesh.h:92
The class that represents a DI-Guy Entity in the world.
Definition: diguyCharacter.h:80
A class that represents the unique per-character non-shared mesh object. DI-Guy encapsulates its text...
Definition: diguyGraphicsShape.h:51