<commit_before>/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. The ASF licenses this
file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.   
*/

#include "max.h"

class BerconSC: public ShadeContext {
private:
	ShadeContext* const sc;

	int type;	
	Point3 uvPoint;
	Point3 uvPoint2;
	int uvChannel;
	int uvChannel2;
	bool useMultiTexture;
	float val;

public:	
	BerconSC(ShadeContext* const sc) : sc (sc) {
		mode = sc->mode;
		doMaps = sc->doMaps;
		filterMaps = sc->filterMaps;
		shadow = sc->shadow;
		backFace = sc->backFace;					
		mtlNum = sc->mtlNum;
		ambientLight = sc->ambientLight;
		nLights = sc->nLights;
		rayLevel = sc->rayLevel;
		xshadeID = sc->xshadeID;
		atmosSkipLight = sc->atmosSkipLight;
		globContext = sc->globContext;
		out = sc->out;

		uvChannel = -1; uvChannel2 = -1; useMultiTexture = false; type = -1;
	}

	void setParams(Point3 p, int type, int chan=0) {
		uvPoint = p;
		this->type = type;
		uvChannel = chan;
	}	

	void setUV1(Point3 uvw, int chan) {
		uvPoint = uvw;
		uvChannel = chan;
	}

	void setUV2(Point3 uvw, int chan) {
		uvPoint2 = uvw;
		uvChannel2 = chan;
	}

	void setMultiTexture(float val) {
		this->val = val;
		useMultiTexture = true;
	}

	void ResetOutput (int n) { sc->ResetOutput(n); }
	Class_ID ClassID () { return sc->ClassID(); }
	BOOL InMtlEditor () { return sc->InMtlEditor(); }
	int Antialias () { return sc->Antialias(); }
	int ProjType () { return sc->ProjType(); }
	LightDesc* Light (int n) { return sc->Light(n); }
	TimeValue CurTime () { return sc->CurTime(); }
	int NodeID () { return sc->NodeID(); }
	INode* Node () { return sc->Node(); }<commit_msg>Add a unique class ID for the bercon specific shade context<commit_after>/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. The ASF licenses this
file to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

  http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.   
*/

#include "max.h"

#define BERCON_SHADE_CONTEXT_CLASS_ID Class_ID(0x7c0a38f1, 0x2f1a67f2)

class BerconSC: public ShadeContext {
private:
	ShadeContext* const sc;

	int type;	
	Point3 uvPoint;
	Point3 uvPoint2;
	int uvChannel;
	int uvChannel2;
	bool useMultiTexture;
	float val;

public:	
	BerconSC(ShadeContext* const sc) : sc (sc) {
		mode = sc->mode;
		doMaps = sc->doMaps;
		filterMaps = sc->filterMaps;
		shadow = sc->shadow;
		backFace = sc->backFace;					
		mtlNum = sc->mtlNum;
		ambientLight = sc->ambientLight;
		nLights = sc->nLights;
		rayLevel = sc->rayLevel;
		xshadeID = sc->xshadeID;
		atmosSkipLight = sc->atmosSkipLight;
		globContext = sc->globContext;
		out = sc->out;

		uvChannel = -1; uvChannel2 = -1; useMultiTexture = false; type = -1;
	}

	void setParams(Point3 p, int type, int chan=0) {
		uvPoint = p;
		this->type = type;
		uvChannel = chan;
	}	

	void setUV1(Point3 uvw, int chan) {
		uvPoint = uvw;
		uvChannel = chan;
	}

	void setUV2(Point3 uvw, int chan) {
		uvPoint2 = uvw;
		uvChannel2 = chan;
	}

	void setMultiTexture(float val) {
		this->val = val;
		useMultiTexture = true;
	}

	void ResetOutput (int n) { sc->ResetOutput(n); }
	Class_ID ClassID () { return BERCON_SHADE_CONTEXT_CLASS_ID; }
	BOOL InMtlEditor () { return sc->InMtlEditor(); }
	int Antialias () { return sc->Antialias(); }
	int ProjType () { return sc->ProjType(); }
	LightDesc* Light (int n) { return sc->Light(n); }
	TimeValue CurTime () { return sc->CurTime(); }
	int NodeID () { return sc->NodeID(); }
	INode* Node () { return sc->Node(); }
{'fraction_non_alphanumeric': 0.11211573236889692, 'fraction_numerical': 0.011754068716094032, 'mean_word_length': 3.878721058434399, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 50, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5581292', 'n_tokens_mistral': 1625, 'n_tokens_neox': 1515, 'n_words': 494}