Panda3D
Functions
texMatrixAttrib.cxx File Reference

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

#include "texMatrixAttrib.h"
#include "graphicsStateGuardianBase.h"
#include "dcast.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"
#include "textureStagePool.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) TexMatrixAttrib
 Constructs a TexMatrixAttrib that applies no stages at all. More...
 

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
2002-03-14

Definition in file texMatrixAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

Constructs a TexMatrixAttrib that applies no stages at all.

Returns a new TexMatrixAttrib just like this one, with the indicated transform for the given stage.

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

Constructs a TexMatrixAttrib that applies the indicated transform to the named texture stage.

Constructs a TexMatrixAttrib that applies the indicated matrix to the default texture stage.

This interface is deprecated.

If this stage already exists, its transform is replaced. Returns a new TexMatrixAttrib just like this one, with the indicated stage removed. Returns the transformation matrix associated with the default texture stage. Returns true if no stages are defined in the TexMatrixAttrib, false if at least one is. Returns true if there is a transform associated with the indicated stage, or false otherwise (in which case get_transform(stage) will return the identity transform). Returns the number of stages that are represented by this attrib. Returns the nth stage that is represented by this attrib. The TextureStages are in no particular order. Returns the transformation matrix associated with the indicated texture stage, or identity matrix if nothing is associated with the indicated stage. Returns the transformation associated with the indicated texture stage, or identity matrix if nothing is associated with the indicated stage. Intended to be overridden by derived TexMatrixAttrib types to return a unique number indicating whether this TexMatrixAttrib is equivalent to the other one.

This should return 0 if the two TexMatrixAttrib objects are equivalent, a number less than zero if this one should be sorted before the other one, and a number greater than zero otherwise.

This will only be called with two TexMatrixAttrib objects whose get_type() functions return the same. Intended to be overridden by derived RenderAttrib types to return a unique hash for these particular properties. RenderAttribs that compare the same with compare_to_impl(), above, should return the same hash; RenderAttribs that compare differently should return a different hash. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

This should return the result of applying the other RenderAttrib to a node in the scene graph below this RenderAttrib, which was already applied. In most cases, the result is the same as the other RenderAttrib (that is, a subsequent RenderAttrib completely replaces the preceding one). On the other hand, some kinds of RenderAttrib (for instance, ColorTransformAttrib) might combine in meaningful ways. Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

See invert_compose() and compose_impl(). Tells the BamReader how to create objects of type TexMatrixAttrib.

Definition at line 37 of file texMatrixAttrib.cxx.