annotate src/Modules/Output/Graphics/Devices/GraphicsOutputDevice.cc @ 611:0fbaf443ec82

Carfac C++ revision 3, indluding more style improvements. The output structs are now classes again, and have separate storage methods for each output structure along with flags in the Run and RunSegment methods to allow for only storing NAPs if desired.
author alexbrandmeyer
date Fri, 17 May 2013 19:52:45 +0000
parents af02b6addf7a
children
rev   line source
tomwalters@116 1 // Copyright 2006, Willem van Engen
tomwalters@116 2 //
tomwalters@116 3 // AIM-C: A C++ implementation of the Auditory Image Model
tomwalters@116 4 // http://www.acousticscale.org/AIMC
tomwalters@116 5 //
tomwalters@116 6 // Licensed under the Apache License, Version 2.0 (the "License");
tomwalters@116 7 // you may not use this file except in compliance with the License.
tomwalters@116 8 // You may obtain a copy of the License at
tomwalters@116 9 //
tomwalters@116 10 // http://www.apache.org/licenses/LICENSE-2.0
tomwalters@116 11 //
tomwalters@116 12 // Unless required by applicable law or agreed to in writing, software
tomwalters@116 13 // distributed under the License is distributed on an "AS IS" BASIS,
tomwalters@116 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
tomwalters@116 15 // See the License for the specific language governing permissions and
tomwalters@116 16 // limitations under the License.
tomwalters@116 17
tomwalters@116 18 #include "Support/Common.h"
tomwalters@116 19 #include "Modules/Output/Graphics/Devices/GraphicsOutputDevice.h"
tomwalters@116 20
tom@229 21 namespace aimc {
tom@229 22
tomwalters@237 23 GraphicsOutputDevice::GraphicsOutputDevice(Parameters *parameters) {
tomwalters@237 24 parameters_ = parameters;
tomwalters@116 25 }
tomwalters@116 26
tomwalters@116 27 void GraphicsOutputDevice::gVertex3f(float x,
tomwalters@116 28 float y,
tomwalters@116 29 float z,
tomwalters@116 30 float r,
tomwalters@116 31 float g,
tomwalters@116 32 float b) {
tomwalters@228 33 gColor3f(r, g, b);
tomwalters@228 34 gVertex3f(x, y, z);
tomwalters@116 35 }
tomwalters@116 36
tomwalters@116 37 void GraphicsOutputDevice::gVertex2f(float x,
tomwalters@116 38 float y,
tomwalters@116 39 float r,
tomwalters@116 40 float g,
tomwalters@116 41 float b) {
tomwalters@228 42 gColor3f(r, g, b);
tomwalters@228 43 gVertex3f(x, y, 0);
tomwalters@116 44 }
tomwalters@116 45
tomwalters@116 46 void GraphicsOutputDevice::gVertex2f(float x, float y) {
tomwalters@228 47 gVertex3f(x, y, 0);
tomwalters@116 48 }
tomwalters@116 49
tomwalters@116 50 void GraphicsOutputDevice::gText2f(float x,
tomwalters@116 51 float y,
tomwalters@237 52 const char *text_string,
tomwalters@237 53 bool rotated) {
tomwalters@237 54 gText3f(x, y, 0, text_string, rotated);
tomwalters@116 55 }
tom@229 56 } // namespace aimc