Panda3D
Functions
cullFaceAttrib.cxx File Reference

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

#include "cullFaceAttrib.h"
#include "graphicsStateGuardianBase.h"
#include "dcast.h"
#include "bamReader.h"
#include "bamWriter.h"
#include "datagram.h"
#include "datagramIterator.h"

Go to the source code of this file.

Functions

 CPT (RenderAttrib) CullFaceAttrib
 Constructs a new CullFaceAttrib object that specifies how to cull geometry. 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-02-27

Definition in file cullFaceAttrib.cxx.

Function Documentation

◆ CPT()

CPT ( RenderAttrib  )

Constructs a new CullFaceAttrib object that specifies how to cull geometry.

Intended to be overridden by derived RenderAttrib types to specify how two consecutive RenderAttrib objects of the same type interact.

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

Constructs a new CullFaceAttrib object that reverses the effects of any other CullFaceAttrib objects in the scene graph.

By Panda convention, vertices are ordered counterclockwise when seen from the front, so the M_cull_clockwise will cull backfacing polygons.

M_cull_unchanged is an identity attrib; if this is applied to vertices without any other intervening attrib, it is the same as applying the default attrib.

M_cull_clockwise will be treated as M_cull_counter_clockwise, and vice-versa. M_cull_none is unchanged.

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 CullFaceAttrib.

Definition at line 34 of file cullFaceAttrib.cxx.