Panda3D
Functions
geomVertexData.cxx File Reference

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University. More...

#include "geomVertexData.h"
#include "geom.h"
#include "geomVertexReader.h"
#include "geomVertexWriter.h"
#include "geomVertexRewriter.h"
#include "pStatTimer.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "pset.h"
#include "indent.h"

Go to the source code of this file.

Functions

 CPT (GeomVertexData) GeomVertexData
 Returns a new GeomVertexData that represents the same contents as this one, with all data types matched up name-by-name to the indicated new format. More...
 
 PT (CopyOnWriteObject) GeomVertexData
 Required to implement CopyOnWriteObject. More...
 
 PT (TransformBlendTable) GeomVertexData
 Returns a modifiable pointer to the current TransformBlendTable on this vertex data, if any, or NULL if there is not a TransformBlendTable. More...
 
 PT (GeomVertexData) GeomVertexData
 Returns a new GeomVertexData object, suitable for modification, with the indicated data type replaced with a new table filled with undefined values. More...
 
 PT (GeomVertexArrayData) GeomVertexDataPipelineWriter
 

Detailed Description

PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.

All rights reserved.

All use of this software is subject to the terms of the revised BSD license. You should have received a copy of this license along with this source code in a file named "LICENSE."

Author
drose
Date
2005-03-06

Definition in file geomVertexData.cxx.

Function Documentation

◆ CPT()

CPT ( GeomVertexData  )

Returns a new GeomVertexData that represents the same contents as this one, with all data types matched up name-by-name to the indicated new format.

Returns a new GeomVertexData object with the color table modified in-place to apply the indicated scale.

If the vertex data does not include a color column, a new one will not be added. Returns a new GeomVertexData object with the color table replaced with a new color table that has been scaled by the indicated value. The new color table will be added as a new array; if the old color table was interleaved with a previous array, the previous array will not be repacked. Returns a new GeomVertexData object with the color data modified in-place with the new value.

If the vertex data does not include a color column, a new one will not be added. Returns a new GeomVertexData object with the color table replaced with a new color table for which each vertex has the indicated value. The new color table will be added as a new array; if the old color table was interleaved with a previous array, the previous array will not be repacked. Returns a new GeomVertexData object with the normal data modified in-place, so that each lighting normal is now facing in the opposite direction.

If the vertex data does not include a normal column, this returns the original GeomVertexData object, unchanged. Returns a GeomVertexData that represents the results of computing the vertex animation on the CPU for this GeomVertexData.

If there is no CPU-defined vertex animation on this object, this just returns the original object.

If there is vertex animation, but the VertexTransform values have not changed since last time, this may return the same pointer it returned previously. Even if the VertexTransform values have changed, it may still return the same pointer, but with its contents modified (this is preferred, since it allows the graphics backend to update vertex buffers optimally).

If force is false, this method may return immediately with stale data, if the vertex data is not completely resident. If force is true, this method will never return stale data, but may block until the data is available. Removes the cache of animated vertices computed by a previous call to animate_vertices() within the same frame. This will force the next call to animate_vertices() to recompute these values from scratch. Normally it is not necessary to call this.

Definition at line 702 of file geomVertexData.cxx.

References LightMutexDirect::acquire(), and LightMutexDirect::release().

Referenced by GeomVertexData::copy_from(), and PT().

◆ PT() [1/3]

Required to implement CopyOnWriteObject.

Definition at line 56 of file geomVertexData.cxx.

◆ PT() [2/3]

Returns a modifiable pointer to the current TransformBlendTable on this vertex data, if any, or NULL if there is not a TransformBlendTable.

See get_transform_blend_table().

Don't call this in a downstream thread unless you don't mind it blowing away other changes you might have recently made in an upstream thread.

Definition at line 389 of file geomVertexData.cxx.

References GeomVertexData::clear_cache_stage(), and Geom::get_next_modified().

◆ PT() [3/3]

PT ( GeomVertexData  )

Returns a new GeomVertexData object, suitable for modification, with the indicated data type replaced with a new table filled with undefined values.

The new table will be added as a new array; if the old table was interleaved with a previous array, the previous array will not be repacked.

If num_components is 0, the indicated name is simply removed from the type, without replacing it with anything else. Writes a verbose, human-friendly description of the indicated vertex number. Removes all of the previously-cached results of convert_to().

This blows away the entire cache, upstream and downstream the pipeline. Use clear_cache_stage() instead if you only want to blow away the cache at the current stage and upstream.

Definition at line 1186 of file geomVertexData.cxx.

References CPT(), GeomVertexArrayFormat::get_num_columns, GeomVertexData::get_num_rows(), and GeomVertexArrayFormat::remove_column().