RenderMan
26.0
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
RixRIB.h
Go to the documentation of this file.
1
/*
2
# ------------------------------------------------------------------------------
3
#
4
# Copyright (c) 2020 Pixar. All rights reserved.
5
#
6
# The information in this file (the "Software") is provided for the exclusive
7
# use of the software licensees of Pixar ("Licensees"). Licensees have the
8
# right to incorporate the Software into other products for use by other
9
# authorized software licensees of Pixar, without fee. Except as expressly
10
# permitted herein, the Software may not be disclosed to third parties, copied
11
# or duplicated in any form, in whole or in part, without the prior written
12
# permission of Pixar.
13
#
14
# The copyright notices in the Software and this entire statement, including the
15
# above license grant, this restriction and the following disclaimer, must be
16
# included in all copies of the Software, in whole or in part, and all permitted
17
# derivative works of the Software, unless such copies or derivative works are
18
# solely in the form of machine-executable object code generated by a source
19
# language processor.
20
#
21
# PIXAR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL
22
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL PIXAR BE
23
# LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
24
# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION
25
# OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
26
# CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. IN NO CASE WILL
27
# PIXAR'S TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR IN CONNECTION WITH
28
# THE USE OR PERFORMANCE OF THIS SOFTWARE EXCEED $50.
29
#
30
# Pixar
31
# 1200 Park Ave
32
# Emeryville CA 94608
33
#
34
# ------------------------------------------------------------------------------
35
*/
36
37
#ifndef RixRIB_h
38
#define RixRIB_h
39
40
#include "
RixInterfaces.h
"
// for RixInterface
41
#include "ri.h"
// for RtBound
42
43
class
Ri;
44
66
class
RixZipSubfile
;
67
68
class
RixZipWriter
{
69
public
:
70
74
virtual
bool
75
BeginSubfile
(
const
char
*subfilename,
bool
compress,
bool
bufferall,
76
RixZipSubfile
**result) = 0;
77
79
virtual
int
80
EndSubfile
() = 0;
81
84
virtual
const
char
*
85
GetError
(
void
) = 0;
86
87
virtual
88
~RixZipWriter
() {}
89
};
90
95
class
RixZipSubfile
{
96
public
:
97
99
virtual
size_t
100
GetSize
(
void
) = 0;
101
103
virtual
void
104
BeginReading
(
void
) = 0;
105
107
virtual
void
108
Read
(
void
*blk,
size_t
blocksize) = 0;
109
111
virtual
void
112
EndReading
(
void
) = 0;
113
115
virtual
void
116
Write
(
const
void
*blk,
size_t
blocksize) = 0;
117
118
119
virtual
120
~RixZipSubfile
() {}
121
};
122
123
124
125
class
RixRIB
:
public
RixInterface
126
{
127
public
:
128
struct
Configuration
129
{
130
enum
Format
131
{
132
k_fmtUndef
,
133
k_fmtAscii
,
134
k_fmtBinary
,
135
};
136
enum
Compression
137
{
138
k_cmpUndef
,
139
k_cmpNone
,
140
k_cmpGzip
,
141
};
142
enum
AsciiStyle
143
{
144
k_asIndented
= 0x1,
145
k_asWide
= 0x2,
146
};
147
Configuration
() :
format
(
k_fmtUndef
),
compression
(
k_cmpUndef
),
asciiStyle
(0),
precision
(0),
bbox
{0,0,0,0,0,0} {}
148
Format
format
;
149
Compression
compression
;
150
int
asciiStyle
;
151
int
precision
;
152
RtBound
bbox
;
153
};
154
158
virtual
Ri*
CreateRIBGenerator
(Ri* parent = 0L,
Configuration
* config =
nullptr
) = 0;
159
161
virtual
void
DestroyRIBGenerator
(Ri*) = 0;
162
165
virtual
RixZipWriter
*
166
GetZipWriter
(
void
) = 0;
167
171
virtual
RixZipSubfile
*
172
OpenSubfileForRead
(
const
char
* path,
const
char
* subfileName) = 0;
173
176
virtual
bool
GetBound
(
const
char
* archiveName, RtBound bound) = 0;
177
178
protected
:
180
RixRIB
() :
RixInterface
(1) {}
181
};
182
183
#endif
RixRIB.h
Generated on Fri Apr 5 2024 12:32:49 for RenderMan by
Doxygen
1.8.4
© Pixar. All Rights Reserved.