15 #ifndef CLIPPINGPLANEATTRIB_H 16 #define CLIPPINGPLANEATTRIB_H 18 #include "pandabase.h" 20 #include "planeNode.h" 21 #include "renderAttrib.h" 23 #include "ordered_vector.h" 37 INLINE ClipPlaneAttrib(
const ClipPlaneAttrib ©);
62 Operation get_operation()
const;
64 int get_num_planes()
const;
77 INLINE
int get_num_on_planes()
const;
78 INLINE
NodePath get_on_plane(
int n)
const;
79 MAKE_SEQ(get_on_planes, get_num_on_planes, get_on_plane);
80 INLINE
bool has_on_plane(
const NodePath &plane)
const;
82 INLINE
int get_num_off_planes()
const;
83 INLINE
NodePath get_off_plane(
int n)
const;
84 MAKE_SEQ(get_off_planes, get_num_off_planes, get_off_plane);
85 INLINE
bool has_off_plane(
const NodePath &plane)
const;
86 INLINE
bool has_all_off()
const;
88 INLINE
bool is_identity()
const;
95 CPT(ClipPlaneAttrib) filter_to_max(
int max_clip_planes)
const;
99 virtual void output(ostream &out)
const;
102 virtual int compare_to_impl(
const RenderAttrib *other)
const;
103 virtual size_t get_hash_impl()
const;
109 INLINE
void check_filtered()
const;
110 void sort_on_planes();
114 Planes _on_planes, _off_planes;
115 bool _off_all_planes;
126 static int get_class_slot() {
129 virtual int get_slot()
const {
130 return get_class_slot();
134 static void register_with_read_factory();
147 static void init_type() {
148 RenderAttrib::init_type();
149 register_type(_type_handle,
"ClipPlaneAttrib",
150 RenderAttrib::get_class_type());
151 _attrib_slot =
register_slot(_type_handle, 100, make_default);
154 return get_class_type();
156 virtual TypeHandle force_init_type() {init_type();
return get_class_type();}
160 static int _attrib_slot;
163 #include "clipPlaneAttrib.I" static int register_slot(TypeHandle type_handle, int sort, RenderAttribRegistry::MakeDefaultFunc *make_default_func)
Adds the indicated TypeHandle to the registry, if it is not there already, and returns a unique slot ...
This is the base class for a number of render attributes (other than transform) that may be set on sc...
This is the fundamental interface for extracting binary objects from a Bam file, as generated by a Ba...
Base class for objects that can be written to and read from Bam files.
This functions similarly to a LightAttrib.
This is the fundamental interface for writing binary objects to a Bam file, to be extracted later by ...
This is our own Panda specialization on the default STL list.
virtual void write_datagram(BamWriter *manager, Datagram &dg)
Writes the contents of this object to the datagram for shipping out to a Bam file.
virtual int complete_pointers(TypedWritable **p_list, BamReader *manager)
Receives an array of pointers, one for each time manager->read_pointer() was called in fillin()...
An instance of this class is passed to the Factory when requesting it to do its business and construc...
This represents a unique collection of RenderAttrib objects that correspond to a particular renderabl...
virtual bool require_fully_complete() const
Some objects require all of their nested pointers to have been completed before the objects themselve...
A class to retrieve the individual data elements previously stored in a Datagram. ...
TypeHandle is the identifier used to differentiate C++ class types.
This is a sequence number that increments monotonically.
An ordered list of data elements, formatted in memory for transmission over a socket or writing to a ...
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
A node that contains a plane.