mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-04 02:42:49 -04:00
publish low-level GeomPrimitive methods
This commit is contained in:
parent
3952960acf
commit
fb73301676
@ -48,6 +48,7 @@
|
|||||||
profileTimer.I profileTimer.h \
|
profileTimer.I profileTimer.h \
|
||||||
pStatCollectorForwardBase.h \
|
pStatCollectorForwardBase.h \
|
||||||
pta_uchar.h pta_float.h \
|
pta_uchar.h pta_float.h \
|
||||||
|
pta_int.h \
|
||||||
ramfile.I ramfile.h \
|
ramfile.I ramfile.h \
|
||||||
referenceCount.I referenceCount.h \
|
referenceCount.I referenceCount.h \
|
||||||
stringDecoder.h stringDecoder.I \
|
stringDecoder.h stringDecoder.I \
|
||||||
@ -101,6 +102,7 @@
|
|||||||
profileTimer.cxx \
|
profileTimer.cxx \
|
||||||
pStatCollectorForwardBase.cxx \
|
pStatCollectorForwardBase.cxx \
|
||||||
pta_uchar.cxx pta_float.cxx \
|
pta_uchar.cxx pta_float.cxx \
|
||||||
|
pta_int.cxx \
|
||||||
ramfile.cxx \
|
ramfile.cxx \
|
||||||
referenceCount.cxx \
|
referenceCount.cxx \
|
||||||
stringDecoder.cxx \
|
stringDecoder.cxx \
|
||||||
@ -163,6 +165,7 @@
|
|||||||
profileTimer.I profileTimer.h \
|
profileTimer.I profileTimer.h \
|
||||||
pStatCollectorForwardBase.h \
|
pStatCollectorForwardBase.h \
|
||||||
pta_uchar.h pta_float.h \
|
pta_uchar.h pta_float.h \
|
||||||
|
pta_int.h \
|
||||||
ramfile.I ramfile.h \
|
ramfile.I ramfile.h \
|
||||||
referenceCount.I referenceCount.h \
|
referenceCount.I referenceCount.h \
|
||||||
stringDecoder.h stringDecoder.I \
|
stringDecoder.h stringDecoder.I \
|
||||||
|
@ -62,3 +62,8 @@ forcetype PointerToArray<float>
|
|||||||
forcetype ConstPointerToArray<float>
|
forcetype ConstPointerToArray<float>
|
||||||
renametype PointerToArray<float> PTAFloat
|
renametype PointerToArray<float> PTAFloat
|
||||||
renametype ConstPointerToArray<float> CPTAFloat
|
renametype ConstPointerToArray<float> CPTAFloat
|
||||||
|
|
||||||
|
forcetype PointerToArray<int>
|
||||||
|
forcetype ConstPointerToArray<int>
|
||||||
|
renametype PointerToArray<int> PTAInt
|
||||||
|
renametype ConstPointerToArray<int> CPTAInt
|
||||||
|
@ -29,15 +29,13 @@
|
|||||||
// rather than defining the pta again.
|
// rather than defining the pta again.
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, RefCountObj<vector_int>);
|
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, RefCountObj<vector_int>);
|
||||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToBase<RefCountObj<vector_int> >);
|
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, PointerToBase<RefCountObj<vector_int> >);
|
||||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, PointerToArray<int>)
|
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, PointerToArray<int>)
|
||||||
EXPORT_TEMPLATE_CLASS(EXPCL_PANDA_PUTIL, EXPTP_PANDA_PUTIL, ConstPointerToArray<int>)
|
EXPORT_TEMPLATE_CLASS(EXPCL_PANDAEXPRESS, EXPTP_PANDAEXPRESS, ConstPointerToArray<int>)
|
||||||
|
|
||||||
BEGIN_PUBLISH
|
|
||||||
typedef PointerToArray<int> PTA_int;
|
typedef PointerToArray<int> PTA_int;
|
||||||
typedef ConstPointerToArray<int> CPTA_int;
|
typedef ConstPointerToArray<int> CPTA_int;
|
||||||
END_PUBLISH
|
|
||||||
|
|
||||||
// Tell GCC that we'll take care of the instantiation explicitly here.
|
// Tell GCC that we'll take care of the instantiation explicitly here.
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
@ -273,12 +273,17 @@ check_valid(const GeomVertexData *vertex_data) const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_vertices
|
// Function: GeomPrimitive::get_vertices
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a const pointer to the vertex index array so
|
// Description: Returns a const pointer to the vertex index array so
|
||||||
// application code can read it directly. This might
|
// application code can read it directly. This might
|
||||||
// return NULL if the primitive is nonindexed. Do not
|
// return NULL if the primitive is nonindexed. Do not
|
||||||
// attempt to modify the returned array; use
|
// attempt to modify the returned array; use
|
||||||
// modify_vertices() or set_vertices() for this.
|
// modify_vertices() or set_vertices() for this.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
||||||
get_vertices() const {
|
get_vertices() const {
|
||||||
@ -288,10 +293,15 @@ get_vertices() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_index_stride
|
// Function: GeomPrimitive::get_index_stride
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: A convenience function to return the gap between
|
// Description: A convenience function to return the gap between
|
||||||
// successive index numbers, in bytes, of the index
|
// successive index numbers, in bytes, of the index
|
||||||
// data.
|
// data.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE int GeomPrimitive::
|
INLINE int GeomPrimitive::
|
||||||
get_index_stride() const {
|
get_index_stride() const {
|
||||||
@ -301,7 +311,7 @@ get_index_stride() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_ends
|
// Function: GeomPrimitive::get_ends
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a const pointer to the primitive ends
|
// Description: Returns a const pointer to the primitive ends
|
||||||
// array so application code can read it directly. Do
|
// array so application code can read it directly. Do
|
||||||
// not attempt to modify the returned array; use
|
// not attempt to modify the returned array; use
|
||||||
@ -310,6 +320,11 @@ get_index_stride() const {
|
|||||||
// Note that simple primitive types, like triangles, do
|
// Note that simple primitive types, like triangles, do
|
||||||
// not have a ends array: since all the primitives
|
// not have a ends array: since all the primitives
|
||||||
// have the same number of vertices, it is not needed.
|
// have the same number of vertices, it is not needed.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE CPTA_int GeomPrimitive::
|
INLINE CPTA_int GeomPrimitive::
|
||||||
get_ends() const {
|
get_ends() const {
|
||||||
@ -319,7 +334,7 @@ get_ends() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_mins
|
// Function: GeomPrimitive::get_mins
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a const pointer to the primitive mins
|
// Description: Returns a const pointer to the primitive mins
|
||||||
// array so application code can read it directly. Do
|
// array so application code can read it directly. Do
|
||||||
// not attempt to modify the returned array; use
|
// not attempt to modify the returned array; use
|
||||||
@ -327,6 +342,11 @@ get_ends() const {
|
|||||||
//
|
//
|
||||||
// Note that simple primitive types, like triangles, do
|
// Note that simple primitive types, like triangles, do
|
||||||
// not have a mins array.
|
// not have a mins array.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
||||||
get_mins() const {
|
get_mins() const {
|
||||||
@ -337,7 +357,7 @@ get_mins() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_maxs
|
// Function: GeomPrimitive::get_maxs
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a const pointer to the primitive maxs
|
// Description: Returns a const pointer to the primitive maxs
|
||||||
// array so application code can read it directly. Do
|
// array so application code can read it directly. Do
|
||||||
// not attempt to modify the returned array; use
|
// not attempt to modify the returned array; use
|
||||||
@ -345,6 +365,11 @@ get_mins() const {
|
|||||||
//
|
//
|
||||||
// Note that simple primitive types, like triangles, do
|
// Note that simple primitive types, like triangles, do
|
||||||
// not have a maxs array.
|
// not have a maxs array.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
INLINE CPT(GeomVertexArrayData) GeomPrimitive::
|
||||||
get_maxs() const {
|
get_maxs() const {
|
||||||
|
@ -988,7 +988,7 @@ write(ostream &out, int indent_level) const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::modify_vertices
|
// Function: GeomPrimitive::modify_vertices
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a modifiable pointer to the vertex index
|
// Description: Returns a modifiable pointer to the vertex index
|
||||||
// list, so application code can directly fiddle with
|
// list, so application code can directly fiddle with
|
||||||
// this data. Use with caution, since there are no
|
// this data. Use with caution, since there are no
|
||||||
@ -1005,6 +1005,11 @@ write(ostream &out, int indent_level) const {
|
|||||||
// Don't call this in a downstream thread unless you
|
// Don't call this in a downstream thread unless you
|
||||||
// don't mind it blowing away other changes you might
|
// don't mind it blowing away other changes you might
|
||||||
// have recently made in an upstream thread.
|
// have recently made in an upstream thread.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PT(GeomVertexArrayData) GeomPrimitive::
|
PT(GeomVertexArrayData) GeomPrimitive::
|
||||||
modify_vertices(int num_vertices) {
|
modify_vertices(int num_vertices) {
|
||||||
@ -1016,7 +1021,7 @@ modify_vertices(int num_vertices) {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::set_vertices
|
// Function: GeomPrimitive::set_vertices
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Completely replaces the vertex index list with a new
|
// Description: Completely replaces the vertex index list with a new
|
||||||
// table. Chances are good that you should also replace
|
// table. Chances are good that you should also replace
|
||||||
// the ends list with set_ends() at the same time.
|
// the ends list with set_ends() at the same time.
|
||||||
@ -1029,6 +1034,11 @@ modify_vertices(int num_vertices) {
|
|||||||
// Don't call this in a downstream thread unless you
|
// Don't call this in a downstream thread unless you
|
||||||
// don't mind it blowing away other changes you might
|
// don't mind it blowing away other changes you might
|
||||||
// have recently made in an upstream thread.
|
// have recently made in an upstream thread.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
set_vertices(const GeomVertexArrayData *vertices, int num_vertices) {
|
set_vertices(const GeomVertexArrayData *vertices, int num_vertices) {
|
||||||
@ -1042,13 +1052,18 @@ set_vertices(const GeomVertexArrayData *vertices, int num_vertices) {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::set_nonindexed_vertices
|
// Function: GeomPrimitive::set_nonindexed_vertices
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Sets the primitive up as a nonindexed primitive,
|
// Description: Sets the primitive up as a nonindexed primitive,
|
||||||
// using the indicated vertex range.
|
// using the indicated vertex range.
|
||||||
//
|
//
|
||||||
// Don't call this in a downstream thread unless you
|
// Don't call this in a downstream thread unless you
|
||||||
// don't mind it blowing away other changes you might
|
// don't mind it blowing away other changes you might
|
||||||
// have recently made in an upstream thread.
|
// have recently made in an upstream thread.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
set_nonindexed_vertices(int first_vertex, int num_vertices) {
|
set_nonindexed_vertices(int first_vertex, int num_vertices) {
|
||||||
@ -1067,7 +1082,7 @@ set_nonindexed_vertices(int first_vertex, int num_vertices) {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::modify_ends
|
// Function: GeomPrimitive::modify_ends
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Returns a modifiable pointer to the primitive ends
|
// Description: Returns a modifiable pointer to the primitive ends
|
||||||
// array, so application code can directly fiddle with
|
// array, so application code can directly fiddle with
|
||||||
// this data. Use with caution, since there are no
|
// this data. Use with caution, since there are no
|
||||||
@ -1080,6 +1095,11 @@ set_nonindexed_vertices(int first_vertex, int num_vertices) {
|
|||||||
// Don't call this in a downstream thread unless you
|
// Don't call this in a downstream thread unless you
|
||||||
// don't mind it blowing away other changes you might
|
// don't mind it blowing away other changes you might
|
||||||
// have recently made in an upstream thread.
|
// have recently made in an upstream thread.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
PTA_int GeomPrimitive::
|
PTA_int GeomPrimitive::
|
||||||
modify_ends() {
|
modify_ends() {
|
||||||
@ -1098,7 +1118,7 @@ modify_ends() {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::set_ends
|
// Function: GeomPrimitive::set_ends
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Completely replaces the primitive ends array with
|
// Description: Completely replaces the primitive ends array with
|
||||||
// a new table. Chances are good that you should also
|
// a new table. Chances are good that you should also
|
||||||
// replace the vertices list with set_vertices() at the
|
// replace the vertices list with set_vertices() at the
|
||||||
@ -1111,6 +1131,11 @@ modify_ends() {
|
|||||||
// Don't call this in a downstream thread unless you
|
// Don't call this in a downstream thread unless you
|
||||||
// don't mind it blowing away other changes you might
|
// don't mind it blowing away other changes you might
|
||||||
// have recently made in an upstream thread.
|
// have recently made in an upstream thread.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
set_ends(CPTA_int ends) {
|
set_ends(CPTA_int ends) {
|
||||||
@ -1123,7 +1148,7 @@ set_ends(CPTA_int ends) {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::set_minmax
|
// Function: GeomPrimitive::set_minmax
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Explicitly specifies the minimum and maximum
|
// Description: Explicitly specifies the minimum and maximum
|
||||||
// vertices, as well as the lists of per-component min
|
// vertices, as well as the lists of per-component min
|
||||||
// and max.
|
// and max.
|
||||||
@ -1136,6 +1161,11 @@ set_ends(CPTA_int ends) {
|
|||||||
// Note that any modification to the vertex array will
|
// Note that any modification to the vertex array will
|
||||||
// normally cause this to be recomputed, unless you set
|
// normally cause this to be recomputed, unless you set
|
||||||
// it immediately again.
|
// it immediately again.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
set_minmax(int min_vertex, int max_vertex,
|
set_minmax(int min_vertex, int max_vertex,
|
||||||
@ -1152,10 +1182,15 @@ set_minmax(int min_vertex, int max_vertex,
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::clear_minmax
|
// Function: GeomPrimitive::clear_minmax
|
||||||
// Access: Public
|
// Access: Published
|
||||||
// Description: Undoes a previous call to set_minmax(), and allows
|
// Description: Undoes a previous call to set_minmax(), and allows
|
||||||
// the minimum and maximum values to be recomputed
|
// the minimum and maximum values to be recomputed
|
||||||
// normally.
|
// normally.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
void GeomPrimitive::
|
void GeomPrimitive::
|
||||||
clear_minmax() {
|
clear_minmax() {
|
||||||
@ -1165,7 +1200,7 @@ clear_minmax() {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_num_vertices_per_primitive
|
// Function: GeomPrimitive::get_num_vertices_per_primitive
|
||||||
// Access: Public, Virtual
|
// Access: Published, Virtual
|
||||||
// Description: If the primitive type is a simple type in which all
|
// Description: If the primitive type is a simple type in which all
|
||||||
// primitives have the same number of vertices, like
|
// primitives have the same number of vertices, like
|
||||||
// triangles, returns the number of vertices per
|
// triangles, returns the number of vertices per
|
||||||
@ -1173,6 +1208,11 @@ clear_minmax() {
|
|||||||
// type in which different primitives might have
|
// type in which different primitives might have
|
||||||
// different numbers of vertices, for instance a
|
// different numbers of vertices, for instance a
|
||||||
// triangle strip, returns 0.
|
// triangle strip, returns 0.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
int GeomPrimitive::
|
int GeomPrimitive::
|
||||||
get_num_vertices_per_primitive() const {
|
get_num_vertices_per_primitive() const {
|
||||||
@ -1181,9 +1221,14 @@ get_num_vertices_per_primitive() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_min_num_vertices_per_primitive
|
// Function: GeomPrimitive::get_min_num_vertices_per_primitive
|
||||||
// Access: Public, Virtual
|
// Access: Published, Virtual
|
||||||
// Description: Returns the minimum number of vertices that must be
|
// Description: Returns the minimum number of vertices that must be
|
||||||
// added before close_primitive() may legally be called.
|
// added before close_primitive() may legally be called.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
int GeomPrimitive::
|
int GeomPrimitive::
|
||||||
get_min_num_vertices_per_primitive() const {
|
get_min_num_vertices_per_primitive() const {
|
||||||
@ -1192,12 +1237,17 @@ get_min_num_vertices_per_primitive() const {
|
|||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
// Function: GeomPrimitive::get_num_unused_vertices_per_primitive
|
// Function: GeomPrimitive::get_num_unused_vertices_per_primitive
|
||||||
// Access: Public, Virtual
|
// Access: Published, Virtual
|
||||||
// Description: Returns the number of vertices that are added between
|
// Description: Returns the number of vertices that are added between
|
||||||
// primitives that aren't, strictly speaking, part of
|
// primitives that aren't, strictly speaking, part of
|
||||||
// the primitives themselves. This is used, for
|
// the primitives themselves. This is used, for
|
||||||
// instance, to define degenerate triangles to connect
|
// instance, to define degenerate triangles to connect
|
||||||
// otherwise disconnected triangle strips.
|
// otherwise disconnected triangle strips.
|
||||||
|
//
|
||||||
|
// This method is intended for low-level usage only.
|
||||||
|
// There are higher-level methods for more common usage.
|
||||||
|
// We recommend you do not use this method directly. If
|
||||||
|
// you do, be sure you know what you are doing!
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
int GeomPrimitive::
|
int GeomPrimitive::
|
||||||
get_num_unused_vertices_per_primitive() const {
|
get_num_unused_vertices_per_primitive() const {
|
||||||
|
@ -143,16 +143,16 @@ PUBLISHED:
|
|||||||
virtual void output(ostream &out) const;
|
virtual void output(ostream &out) const;
|
||||||
virtual void write(ostream &out, int indent_level) const;
|
virtual void write(ostream &out, int indent_level) const;
|
||||||
|
|
||||||
public:
|
PUBLISHED:
|
||||||
// These public methods are not intended for high-level usage. They
|
// These public methods are not intended for high-level usage. They
|
||||||
// are public so that C++ code that absolutely needs fast access to
|
// are public so that low-level code that absolutely needs fast
|
||||||
// the primitive data can get to it, but using them requires
|
// access to the primitive data can get to it, but using them
|
||||||
// knowledge about how the component primitives are encoded within
|
// requires knowledge about how the component primitives are encoded
|
||||||
// the GeomPrimitive class, and it's easy to screw something up.
|
// within the GeomPrimitive class, and it's easy to screw something
|
||||||
// Also, if too many code samples depend on this internal knowledge,
|
// up. Also, if too many code samples depend on this internal
|
||||||
// it may make it difficult to extend this class later. It is
|
// knowledge, it may make it difficult to extend this class later.
|
||||||
// recommended that application-level code use the above interfaces
|
// It is recommended that application-level code use the above
|
||||||
// instead.
|
// interfaces instead.
|
||||||
|
|
||||||
INLINE CPT(GeomVertexArrayData) get_vertices() const;
|
INLINE CPT(GeomVertexArrayData) get_vertices() const;
|
||||||
PT(GeomVertexArrayData) modify_vertices(int num_vertices = -1);
|
PT(GeomVertexArrayData) modify_vertices(int num_vertices = -1);
|
||||||
@ -176,6 +176,7 @@ public:
|
|||||||
virtual int get_min_num_vertices_per_primitive() const;
|
virtual int get_min_num_vertices_per_primitive() const;
|
||||||
virtual int get_num_unused_vertices_per_primitive() const;
|
virtual int get_num_unused_vertices_per_primitive() const;
|
||||||
|
|
||||||
|
public:
|
||||||
void prepare(PreparedGraphicsObjects *prepared_objects);
|
void prepare(PreparedGraphicsObjects *prepared_objects);
|
||||||
bool is_prepared(PreparedGraphicsObjects *prepared_objects) const;
|
bool is_prepared(PreparedGraphicsObjects *prepared_objects) const;
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@
|
|||||||
pbitops.I pbitops.h \
|
pbitops.I pbitops.h \
|
||||||
portalMask.h \
|
portalMask.h \
|
||||||
pta_double.h \
|
pta_double.h \
|
||||||
pta_int.h pta_ushort.h \
|
pta_ushort.h \
|
||||||
pythonCallbackObject.h pythonCallbackObject.I \
|
pythonCallbackObject.h pythonCallbackObject.I \
|
||||||
simpleHashMap.I simpleHashMap.h \
|
simpleHashMap.I simpleHashMap.h \
|
||||||
sparseArray.I sparseArray.h \
|
sparseArray.I sparseArray.h \
|
||||||
@ -107,7 +107,7 @@
|
|||||||
nodeCachedReferenceCount.cxx \
|
nodeCachedReferenceCount.cxx \
|
||||||
pbitops.cxx \
|
pbitops.cxx \
|
||||||
pta_double.cxx \
|
pta_double.cxx \
|
||||||
pta_int.cxx pta_ushort.cxx \
|
pta_ushort.cxx \
|
||||||
pythonCallbackObject.cxx \
|
pythonCallbackObject.cxx \
|
||||||
simpleHashMap.cxx \
|
simpleHashMap.cxx \
|
||||||
sparseArray.cxx \
|
sparseArray.cxx \
|
||||||
@ -169,7 +169,7 @@
|
|||||||
portalMask.h \
|
portalMask.h \
|
||||||
pbitops.I pbitops.h \
|
pbitops.I pbitops.h \
|
||||||
pta_double.h \
|
pta_double.h \
|
||||||
pta_int.h pta_ushort.h \
|
pta_ushort.h \
|
||||||
pythonCallbackObject.h pythonCallbackObject.I \
|
pythonCallbackObject.h pythonCallbackObject.I \
|
||||||
simpleHashMap.I simpleHashMap.h \
|
simpleHashMap.I simpleHashMap.h \
|
||||||
sparseArray.I sparseArray.h \
|
sparseArray.I sparseArray.h \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user