Panda3D
loaderOptions.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 loaderOptions.I
10  * @author drose
11  * @date 2005-10-05
12  */
13 
14 /**
15  *
16  */
17 constexpr LoaderOptions::
18 LoaderOptions(int flags, int texture_flags) :
19  _flags(flags),
20  _texture_flags(texture_flags),
21  _texture_num_views(0),
22  _auto_texture_scale(ATS_unspecified)
23 {
24 }
25 
26 /**
27  *
28  */
29 INLINE void LoaderOptions::
30 set_flags(int flags) {
31  _flags = flags;
32 }
33 
34 /**
35  *
36  */
37 INLINE int LoaderOptions::
38 get_flags() const {
39  return _flags;
40 }
41 
42 /**
43  *
44  */
45 INLINE void LoaderOptions::
46 set_texture_flags(int texture_flags) {
47  _texture_flags = texture_flags;
48 }
49 
50 /**
51  *
52  */
53 INLINE int LoaderOptions::
54 get_texture_flags() const {
55  return _texture_flags;
56 }
57 
58 /**
59  * Specifies the expected number of views to load for the texture. This is
60  * ignored unless TF_multiview is included in texture_flags. This must be
61  * specified when loading a 3-d multiview texture or 2-d texture array, in
62  * which case it is used to differentiate z levels from separate views; it
63  * may be zero in the case of 2-d textures or cube maps, in which case the
64  * number of views can be inferred from the number of images found on disk.
65  */
66 INLINE void LoaderOptions::
67 set_texture_num_views(int texture_num_views) {
68  _texture_num_views = texture_num_views;
69 }
70 
71 /**
72  * See set_texture_num_views().
73  */
74 INLINE int LoaderOptions::
75 get_texture_num_views() const {
76  return _texture_num_views;
77 }
78 
79 /**
80  * Set this flag to ATS_none, ATS_up, ATS_down, or ATS_pad to control how a
81  * texture is scaled from disk when it is subsequently loaded. Set it to
82  * ATS_unspecified to restore the default behavior.
83  */
84 INLINE void LoaderOptions::
85 set_auto_texture_scale(AutoTextureScale scale) {
86  _auto_texture_scale = scale;
87 }
88 
89 /**
90  * See set_auto_texture_scale().
91  */
92 INLINE AutoTextureScale LoaderOptions::
93 get_auto_texture_scale() const {
94  return _auto_texture_scale;
95 }
set_texture_num_views
Specifies the expected number of views to load for the texture.
Definition: loaderOptions.h:64
set_auto_texture_scale
Set this flag to ATS_none, ATS_up, ATS_down, or ATS_pad to control how a texture is scaled from disk ...
Definition: loaderOptions.h:69