RenderMan API
23.0
RixRIB.h
Go to the documentation of this file.
1
/*
2
# ------------------------------------------------------------------------------
3
#
4
# Copyright (c) 1986-2019 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
38
#ifndef RixRIB_h
39
#define RixRIB_h
40
41
#include "
RixInterfaces.h
"
// for RixInterface
42
#include "
ri.h
"
// for RtBound
43
44
class
Ri
;
45
67
class
RixZipSubfile
;
68
69
class
RixZipWriter
{
70
public
:
71
75
virtual
bool
76
BeginSubfile
(
const
char
*subfilename,
bool
compress,
bool
bufferall,
77
RixZipSubfile
**result) = 0;
78
80
virtual
int
81
EndSubfile
() = 0;
82
85
virtual
const
char
*
86
GetError
(
void
) = 0;
87
88
virtual
89
~RixZipWriter
() {}
90
};
91
96
class
RixZipSubfile
{
97
public
:
98
100
virtual
size_t
101
GetSize(
void
) = 0;
102
104
virtual
void
105
BeginReading(
void
) = 0;
106
108
virtual
void
109
Read(
void
*blk,
size_t
blocksize) = 0;
110
112
virtual
void
113
EndReading(
void
) = 0;
114
116
virtual
void
117
Write(
const
void
*blk,
size_t
blocksize) = 0;
118
119
120
virtual
121
~RixZipSubfile
() {}
122
};
123
124
125
126
class
RixRIB
:
public
RixInterface
127
{
128
public
:
129
struct
Configuration
130
{
131
enum
Format
132
{
133
k_fmtUndef
,
134
k_fmtAscii
,
135
k_fmtBinary
,
136
};
137
enum
Compression
138
{
139
k_cmpUndef
,
140
k_cmpNone
,
141
k_cmpGzip
,
142
};
143
enum
AsciiStyle
144
{
145
k_asIndented = 0x1,
146
k_asWide = 0x2,
147
};
148
Configuration
() : format(k_fmtUndef), compression(k_cmpUndef), asciiStyle(0), precision(0), bbox{0,0,0,0,0,0} {}
149
Format
format
;
150
Compression
compression
;
151
int
asciiStyle
;
152
int
precision
;
153
RtBound
bbox
;
154
};
155
159
virtual
Ri
* CreateRIBGenerator(
Ri
* parent = 0L,
Configuration
* config =
nullptr
) = 0;
160
162
virtual
void
DestroyRIBGenerator(
Ri
*) = 0;
163
166
virtual
RixZipWriter
*
167
GetZipWriter(
void
) = 0;
168
172
virtual
RixZipSubfile
*
173
OpenSubfileForRead(
const
char
* path,
const
char
* subfileName) = 0;
174
177
virtual
bool
GetBound(
const
char
* archiveName,
RtBound
bound) = 0;
178
179
protected
:
181
RixRIB
() :
RixInterface
(1) {}
182
};
183
184
#endif
RixRIB::Configuration::asciiStyle
int asciiStyle
Definition:
RixRIB.h:151
RixRIB::Configuration::k_fmtUndef
Definition:
RixRIB.h:133
RixZipWriter
Definition:
RixRIB.h:69
RixRIB::Configuration::k_fmtAscii
Definition:
RixRIB.h:134
RixZipWriter::BeginSubfile
virtual bool BeginSubfile(const char *subfilename, bool compress, bool bufferall, RixZipSubfile **result)=0
RixRIB::Configuration::compression
Compression compression
Definition:
RixRIB.h:150
RixRIB::RixRIB
RixRIB()
Constructor is for internal use only.
Definition:
RixRIB.h:181
RixRIB::Configuration::Configuration
Configuration()
Definition:
RixRIB.h:148
RixRIB::Configuration::AsciiStyle
AsciiStyle
Definition:
RixRIB.h:143
RixRIB::Configuration::k_cmpNone
Definition:
RixRIB.h:140
RtBound
float RtBound[6]
Definition:
ri.h:64
RixZipWriter::EndSubfile
virtual int EndSubfile()=0
returns non zero on error
RixInterfaces.h
RixRIB::Configuration::k_cmpUndef
Definition:
RixRIB.h:139
RixRIB::Configuration::k_fmtBinary
Definition:
RixRIB.h:135
RixInterface
Definition:
RixInterfaces.h:131
RixRIB::Configuration::format
Format format
Definition:
RixRIB.h:149
RixRIB::Configuration::Compression
Compression
Definition:
RixRIB.h:137
RixRIB::Configuration::bbox
RtBound bbox
Definition:
RixRIB.h:153
Ri
Definition:
ri.hpp:46
RixRIB::Configuration::Format
Format
Definition:
RixRIB.h:131
ri.h
RixZipWriter::GetError
virtual const char * GetError(void)=0
RixRIB
Definition:
RixRIB.h:126
RixRIB::Configuration::precision
int precision
Definition:
RixRIB.h:152
RixRIB::Configuration
Definition:
RixRIB.h:129
RixRIB::Configuration::k_cmpGzip
Definition:
RixRIB.h:141
RixZipSubfile
Definition:
RixRIB.h:96
RixZipSubfile::~RixZipSubfile
virtual ~RixZipSubfile()
Definition:
RixRIB.h:121
RixZipWriter::~RixZipWriter
virtual ~RixZipWriter()
Definition:
RixRIB.h:89
include
RixRIB.h
Generated by
1.8.13