Panda3D
Loading...
Searching...
No Matches
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 */
17constexpr LoaderOptions::
18LoaderOptions(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 */
29INLINE void LoaderOptions::
30set_flags(int flags) {
31 _flags = flags;
32}
33
34/**
35 *
36 */
37INLINE int LoaderOptions::
38get_flags() const {
39 return _flags;
40}
41
42/**
43 *
44 */
45INLINE void LoaderOptions::
46set_texture_flags(int texture_flags) {
47 _texture_flags = texture_flags;
48}
49
50/**
51 *
52 */
53INLINE int LoaderOptions::
54get_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 */
66INLINE void LoaderOptions::
67set_texture_num_views(int texture_num_views) {
68 _texture_num_views = texture_num_views;
69}
70
71/**
72 * See set_texture_num_views().
73 */
74INLINE int LoaderOptions::
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 */
84INLINE void LoaderOptions::
85set_auto_texture_scale(AutoTextureScale scale) {
86 _auto_texture_scale = scale;
87}
88
89/**
90 * See set_auto_texture_scale().
91 */
92INLINE AutoTextureScale LoaderOptions::
94 return _auto_texture_scale;
95}
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 ...
get_auto_texture_scale
See set_auto_texture_scale().
set_texture_num_views
Specifies the expected number of views to load for the texture.
get_texture_num_views
See set_texture_num_views().