Panda3D
Loading...
Searching...
No Matches
texProjectorEffect.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file texProjectorEffect.I
10 * @author drose
11 * @date 2004-07-25
12 */
13
14/**
15 * Use TexProjectorEffect::make() to construct a new TexProjectorEffect
16 * object.
17 */
18INLINE TexProjectorEffect::
19TexProjectorEffect() {
20}
21
22/**
23 * Use TexProjectorEffect::make() to construct a new TexProjectorEffect
24 * object.
25 */
26INLINE TexProjectorEffect::
27TexProjectorEffect(const TexProjectorEffect &copy) :
28 _stages(copy._stages)
29{
30}
31
32/**
33 *
34 */
35INLINE TexProjectorEffect::StageDef::
36StageDef() :
37 _to_lens_node(nullptr)
38{
39}
40
41/**
42 *
43 */
44INLINE void TexProjectorEffect::StageDef::
45set_from(const NodePath &from) {
46 _from = from;
47}
48
49/**
50 *
51 */
52INLINE void TexProjectorEffect::StageDef::
53set_lens_index(int lens_index) {
54 _lens_index = lens_index;
55}
56
57/**
58 *
59 */
60INLINE int TexProjectorEffect::StageDef::
61compare_to(const TexProjectorEffect::StageDef &other) const {
62 int compare = _to.compare_to(other._to);
63 if (compare != 0) {
64 return compare;
65 }
66
67 if (_lens_index != other._lens_index) {
68 return _lens_index - other._lens_index;
69 }
70
71 return _from.compare_to(other._from);
72}
NodePath is the fundamental system for disambiguating instances, and also provides a higher-level int...
Definition nodePath.h:159
This effect automatically applies a computed texture matrix to the specified texture stage,...